src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/PasteAllHandler.php
protected function getCollection(EnvironmentInterface $environment)
    {
        $dataDefinition = $environment->getDataDefinition();
        $relationShip   = $dataDefinition->getModelRelationshipDefinition();

        if (!$relationShip->getChildCondition($dataDefinition->getName(), $dataDefinition->getName())) {
            return $this->getFlatCollection($environment);
        }

        return $this->getHierarchyCollection($this->getClipboardItems($environment), $environment);
    }
protected function getCollection(EnvironmentInterface $environment)
    {
        $dataDefinition = $environment->getDataDefinition();
        $relationShip   = $dataDefinition->getModelRelationshipDefinition();

        if (!$relationShip->getChildCondition($dataDefinition->getName(), $dataDefinition->getName())) {
            return $this->getFlatCollection($environment);
        }

        return $this->getHierarchyCollection($this->getClipboardItems($environment), $environment);
    }
protected function getCollection ( EnvironmentInterface $ environment ) { $ dataDefinition = $ environment -> getDataDefinition ( ) ; $ relationShip = $ dataDefinition -> getModelRelationshipDefinition ( ) ; if ( ! $ relationShip -> getChildCondition ( $ dataDefinition -> getName ( ) , $ dataDefinition -> getName ( ) ) ) { return $ this -> getFlatCollection ( $ environment ) ; } return $ this -> getHierarchyCollection ( $ this -> getClipboardItems ( $ environment ) , $ environment ) ; }
Get the collection.

@param EnvironmentInterface $environment The environment.

@return array
Get the collection .