src/CoreBundle/EventListener/DcGeneral/MetaModel/PasteButtonListener.php
private function checkModelWithVariants($containedModel)
    {
        // Item and variant support.
        $isVarbase        = (bool) $containedModel->getProperty('varbase');
        $vargroup         = $containedModel->getProperty('vargroup');
        $isCurrentVarbase = (bool) $this->currentModel->getProperty('varbase');
        $currentVargroup  = $this->currentModel->getProperty('vargroup');

        if ($isVarbase && !$this->circularReference && $isCurrentVarbase) {
            // Insert new items only after bases.
            // Insert a varbase after any other varbase, for sorting.
            $this->disablePA = false;
        } elseif (!$isVarbase && !$isCurrentVarbase && $vargroup == $currentVargroup) {
            // Move items in their vargroup and only there.
            $this->disablePA = false;
        }

        $this->disablePI = !$isCurrentVarbase || $isVarbase;
    }
private function checkModelWithVariants($containedModel)
    {
        // Item and variant support.
        $isVarbase        = (bool) $containedModel->getProperty('varbase');
        $vargroup         = $containedModel->getProperty('vargroup');
        $isCurrentVarbase = (bool) $this->currentModel->getProperty('varbase');
        $currentVargroup  = $this->currentModel->getProperty('vargroup');

        if ($isVarbase && !$this->circularReference && $isCurrentVarbase) {
            // Insert new items only after bases.
            // Insert a varbase after any other varbase, for sorting.
            $this->disablePA = false;
        } elseif (!$isVarbase && !$isCurrentVarbase && $vargroup == $currentVargroup) {
            // Move items in their vargroup and only there.
            $this->disablePA = false;
        }

        $this->disablePI = !$isCurrentVarbase || $isVarbase;
    }
Check the PA and PI with a model and variant support.

@param ModelInterface $containedModel The model to check.

@return void