src/Contao/View/Contao2BackendView/TreeView.php
private function handleNodeStateChanges()
    {
        $input = $this->getEnvironment()->getInputProvider();
        if (($modelId = $input->getParameter('ptg')) && ($providerName = $input->getParameter('provider'))) {
            $states = $this->getTreeNodeStates();
            // Check if the open/close all has been triggered or just a model.
            if ('all' === $modelId) {
                if ($states->isAllOpen()) {
                    $states->resetAll();
                }
                $states->setAllOpen($states->isAllOpen());
            } else {
                $this->toggleModel($providerName, $modelId);
            }

            ViewHelpers::redirectHome($this->environment);
        }
    }
private function handleNodeStateChanges()
    {
        $input = $this->getEnvironment()->getInputProvider();
        if (($modelId = $input->getParameter('ptg')) && ($providerName = $input->getParameter('provider'))) {
            $states = $this->getTreeNodeStates();
            // Check if the open/close all has been triggered or just a model.
            if ('all' === $modelId) {
                if ($states->isAllOpen()) {
                    $states->resetAll();
                }
                $states->setAllOpen($states->isAllOpen());
            } else {
                $this->toggleModel($providerName, $modelId);
            }

            ViewHelpers::redirectHome($this->environment);
        }
    }
private function handleNodeStateChanges ( ) { $ input = $ this -> getEnvironment ( ) -> getInputProvider ( ) ; if ( ( $ modelId = $ input -> getParameter ( 'ptg' ) ) && ( $ providerName = $ input -> getParameter ( 'provider' ) ) ) { $ states = $ this -> getTreeNodeStates ( ) ; // Check if the open/close all has been triggered or just a model. if ( 'all' === $ modelId ) { if ( $ states -> isAllOpen ( ) ) { $ states -> resetAll ( ) ; } $ states -> setAllOpen ( $ states -> isAllOpen ( ) ) ; } else { $ this -> toggleModel ( $ providerName , $ modelId ) ; } ViewHelpers :: redirectHome ( $ this -> environment ) ; } }
Check the get parameters if there is any node toggling.

CAUTION: If there has been any action, the browser will get redirected and the script therefore exited.

@return void
Check the get parameters if there is any node toggling .