src/Contao/Dca/Populator/ParentDefinitionPopulator.php
public function populateController(EnvironmentInterface $environment)
    {
        $definition = $environment->getDataDefinition();

        if (!$definition->getBasicDefinition()->getParentDataProvider()) {
            return;
        }

        $parentDefinition = (new DcGeneralFactory())
            ->setEventDispatcher($environment->getEventDispatcher())
            ->setTranslator($environment->getTranslator())
            ->setContainerName($definition->getBasicDefinition()->getParentDataProvider())
            ->createDcGeneral()
            ->getEnvironment()
            ->getDataDefinition();

        $environment->setParentDataDefinition($parentDefinition);
    }
public function populateController(EnvironmentInterface $environment)
    {
        $definition = $environment->getDataDefinition();

        if (!$definition->getBasicDefinition()->getParentDataProvider()) {
            return;
        }

        $parentDefinition = (new DcGeneralFactory())
            ->setEventDispatcher($environment->getEventDispatcher())
            ->setTranslator($environment->getTranslator())
            ->setContainerName($definition->getBasicDefinition()->getParentDataProvider())
            ->createDcGeneral()
            ->getEnvironment()
            ->getDataDefinition();

        $environment->setParentDataDefinition($parentDefinition);
    }
public function populateController ( EnvironmentInterface $ environment ) { $ definition = $ environment -> getDataDefinition ( ) ; if ( ! $ definition -> getBasicDefinition ( ) -> getParentDataProvider ( ) ) { return ; } $ parentDefinition = ( new DcGeneralFactory ( ) ) -> setEventDispatcher ( $ environment -> getEventDispatcher ( ) ) -> setTranslator ( $ environment -> getTranslator ( ) ) -> setContainerName ( $ definition -> getBasicDefinition ( ) -> getParentDataProvider ( ) ) -> createDcGeneral ( ) -> getEnvironment ( ) -> getDataDefinition ( ) ; $ environment -> setParentDataDefinition ( $ parentDefinition ) ; }
Create a parent data definition, if parent data provider defined.

@param EnvironmentInterface $environment The environment to populate.

@return void

@internal
Create a parent data definition if parent data provider defined .