code: private function checkForModel($containedModel, $action)
      {
          if (!$this->circularReference) {
              if ($this->hasVariants()) {
                  $this->checkModelWithVariants($containedModel);
              }
              $this->checkModelWithoutVariants($containedModel);
          } elseif ($this->currentModel == null && $containedModel->getProperty('varbase') == 0) {
              $this->disablePA = true;
          } else {
              $this->disablePA = false;
              // The following rules apply:
              // 1. Variant bases must not get pasted into anything.
              // 2. If we are not in create mode, disable the paste into for the item itself.
              $this->disablePI =
                  ($this->hasVariants() && $containedModel->getProperty('varbase') == 1)
                  || ($action != 'create' && $containedModel->getId() == $this->currentModel->getId());
          }
      }
docs: Check the PA and PI with a model.
  
  @param ModelInterface $containedModel The model with all data.
  
  @param string         $action         The action to be checked.
  
  @return void