src/Contao/Dca/Builder/Legacy/ExtendedLegacyDcaDataDefinitionBuilder.php
protected function parseDynamicParentTableProperty(ContainerInterface $container)
    {
        if ((null === ($propertyName = $this->getFromDca('dca_config/parent_table_property')))
            || (null === ($sourceProvider = $this->getFromDca('config/ptable')))
            || (null === ($dynamicParentTable = $this->getFromDca('config/dynamicPtable')))
        ) {
            return;
        }

        $relationship   = $container->getModelRelationshipDefinition();
        $childCondition = $relationship->getChildCondition($sourceProvider, $container->getName());
        if (null === $childCondition) {
            return;
        }

        $childCondition->setFilterArray(
            \array_merge(
                $childCondition->getFilterArray(),
                [
                    [
                        'local'        => $propertyName,
                        'remote_value' => $sourceProvider,
                        'operation'    => '='
                    ]
                ]
            )
        );

        $backendView = $container->getDefinition(Contao2BackendViewDefinition::NAME);
        $backendView->getListingConfig()->setParentTablePropertyName($propertyName);
        $container->getBasicDefinition()->setDynamicParentTable($dynamicParentTable);
    }
protected function parseDynamicParentTableProperty(ContainerInterface $container)
    {
        if ((null === ($propertyName = $this->getFromDca('dca_config/parent_table_property')))
            || (null === ($sourceProvider = $this->getFromDca('config/ptable')))
            || (null === ($dynamicParentTable = $this->getFromDca('config/dynamicPtable')))
        ) {
            return;
        }

        $relationship   = $container->getModelRelationshipDefinition();
        $childCondition = $relationship->getChildCondition($sourceProvider, $container->getName());
        if (null === $childCondition) {
            return;
        }

        $childCondition->setFilterArray(
            \array_merge(
                $childCondition->getFilterArray(),
                [
                    [
                        'local'        => $propertyName,
                        'remote_value' => $sourceProvider,
                        'operation'    => '='
                    ]
                ]
            )
        );

        $backendView = $container->getDefinition(Contao2BackendViewDefinition::NAME);
        $backendView->getListingConfig()->setParentTablePropertyName($propertyName);
        $container->getBasicDefinition()->setDynamicParentTable($dynamicParentTable);
    }
protected function parseDynamicParentTableProperty ( ContainerInterface $ container ) { if ( ( null === ( $ propertyName = $ this -> getFromDca ( 'dca_config/parent_table_property' ) ) ) || ( null === ( $ sourceProvider = $ this -> getFromDca ( 'config/ptable' ) ) ) || ( null === ( $ dynamicParentTable = $ this -> getFromDca ( 'config/dynamicPtable' ) ) ) ) { return ; } $ relationship = $ container -> getModelRelationshipDefinition ( ) ; $ childCondition = $ relationship -> getChildCondition ( $ sourceProvider , $ container -> getName ( ) ) ; if ( null === $ childCondition ) { return ; } $ childCondition -> setFilterArray ( \ array_merge ( $ childCondition -> getFilterArray ( ) , [ [ 'local' => $ propertyName , 'remote_value' => $ sourceProvider , 'operation' => '=' ] ] ) ) ; $ backendView = $ container -> getDefinition ( Contao2BackendViewDefinition :: NAME ) ; $ backendView -> getListingConfig ( ) -> setParentTablePropertyName ( $ propertyName ) ; $ container -> getBasicDefinition ( ) -> setDynamicParentTable ( $ dynamicParentTable ) ; }
Parse the dynamic parent table.

@param ContainerInterface $container The container where the data shall be stored.

@return void
Parse the dynamic parent table .