src/Contao/View/Contao2BackendView/TreePicker.php
public function generateAjax()
    {
        $input = $this->getEnvironment()->getInputProvider();

        if ($input->hasValue('action')
            && ('DcGeneralLoadSubTree' === $input->getValue('action'))
        ) {
            $provider = $input->getValue('providerName');
            $rootId   = $input->getValue('id');
            $this->getEnvironment()->getSessionStorage()->set(
                $this->getToggleId(),
                $this->getTreeNodeStates()->toggleModel($provider, $rootId)->getStates()
            );
            $collection = $this->loadCollection($rootId, ((int) $input->getValue('level') + 1));
            return $this->generateTreeView($collection, 'tree');
        }

        return '';
    }
public function generateAjax()
    {
        $input = $this->getEnvironment()->getInputProvider();

        if ($input->hasValue('action')
            && ('DcGeneralLoadSubTree' === $input->getValue('action'))
        ) {
            $provider = $input->getValue('providerName');
            $rootId   = $input->getValue('id');
            $this->getEnvironment()->getSessionStorage()->set(
                $this->getToggleId(),
                $this->getTreeNodeStates()->toggleModel($provider, $rootId)->getStates()
            );
            $collection = $this->loadCollection($rootId, ((int) $input->getValue('level') + 1));
            return $this->generateTreeView($collection, 'tree');
        }

        return '';
    }
public function generateAjax ( ) { $ input = $ this -> getEnvironment ( ) -> getInputProvider ( ) ; if ( $ input -> hasValue ( 'action' ) && ( 'DcGeneralLoadSubTree' === $ input -> getValue ( 'action' ) ) ) { $ provider = $ input -> getValue ( 'providerName' ) ; $ rootId = $ input -> getValue ( 'id' ) ; $ this -> getEnvironment ( ) -> getSessionStorage ( ) -> set ( $ this -> getToggleId ( ) , $ this -> getTreeNodeStates ( ) -> toggleModel ( $ provider , $ rootId ) -> getStates ( ) ) ; $ collection = $ this -> loadCollection ( $ rootId , ( ( int ) $ input -> getValue ( 'level' ) + 1 ) ) ; return $ this -> generateTreeView ( $ collection , 'tree' ) ; } return '' ; }
Generate a particular sub part of the page tree and return it as HTML string.

@return string
Generate a particular sub part of the page tree and return it as HTML string .