src/Contao/View/Contao2BackendView/TreePicker.php
private function prepareFilterForRootCondition()
    {
        $environment   = $this->getEnvironment();
        $rootCondition = $environment->getDataDefinition()->getModelRelationshipDefinition()->getRootCondition();

        $baseConfig = $environment->getBaseConfigRegistry()->getBaseConfig();
        if (!$rootCondition) {
            return $baseConfig;
        }

        $baseFilter = $baseConfig->getFilter();
        $filter     = $rootCondition->getFilterArray();

        if ($baseFilter) {
            $filter = \array_merge($baseFilter, $filter);
        }

        $baseConfig->setFilter($filter);

        return $baseConfig;
    }
private function prepareFilterForRootCondition()
    {
        $environment   = $this->getEnvironment();
        $rootCondition = $environment->getDataDefinition()->getModelRelationshipDefinition()->getRootCondition();

        $baseConfig = $environment->getBaseConfigRegistry()->getBaseConfig();
        if (!$rootCondition) {
            return $baseConfig;
        }

        $baseFilter = $baseConfig->getFilter();
        $filter     = $rootCondition->getFilterArray();

        if ($baseFilter) {
            $filter = \array_merge($baseFilter, $filter);
        }

        $baseConfig->setFilter($filter);

        return $baseConfig;
    }
private function prepareFilterForRootCondition ( ) { $ environment = $ this -> getEnvironment ( ) ; $ rootCondition = $ environment -> getDataDefinition ( ) -> getModelRelationshipDefinition ( ) -> getRootCondition ( ) ; $ baseConfig = $ environment -> getBaseConfigRegistry ( ) -> getBaseConfig ( ) ; if ( ! $ rootCondition ) { return $ baseConfig ; } $ baseFilter = $ baseConfig -> getFilter ( ) ; $ filter = $ rootCondition -> getFilterArray ( ) ; if ( $ baseFilter ) { $ filter = \ array_merge ( $ baseFilter , $ filter ) ; } $ baseConfig -> setFilter ( $ filter ) ; return $ baseConfig ; }
Prepare filter if has root condition.

@return ConfigInterface
Prepare filter if has root condition .