src/CoreBundle/EventListener/DcGeneral/MetaModel/PasteButtonListener.php
private function checkModelWithoutVariants($containedModel)
    {
        $parentDefinition = $this->environment->getDataDefinition()->getBasicDefinition()->getParentDataProvider();

        $this->disablePA = ($this->currentModel->getId() == $containedModel->getId())
            || ($parentDefinition && $this->currentModel->getProperty('pid') == $containedModel->getProperty('pid'));
        $this->disablePI = ($this->circularReference)
            || ($this->currentModel->getId() == $containedModel->getId())
            || ($parentDefinition && $this->currentModel->getProperty('pid') == $containedModel->getId());
    }
private function checkModelWithoutVariants($containedModel)
    {
        $parentDefinition = $this->environment->getDataDefinition()->getBasicDefinition()->getParentDataProvider();

        $this->disablePA = ($this->currentModel->getId() == $containedModel->getId())
            || ($parentDefinition && $this->currentModel->getProperty('pid') == $containedModel->getProperty('pid'));
        $this->disablePI = ($this->circularReference)
            || ($this->currentModel->getId() == $containedModel->getId())
            || ($parentDefinition && $this->currentModel->getProperty('pid') == $containedModel->getId());
    }
Check the PA and PI with a model and a normal flat build.

@param ModelInterface $containedModel The model to check.

@return void