src/Controller/Ajax.php
public function executePostActions(DataContainerInterface $container)
    {
        \header('Content-Type: text/html; charset=' . $GLOBALS['TL_CONFIG']['characterSet']);

        $this->objDc = $container;

        $action = $this->getEnvironment()->getInputProvider()->getValue('action');

        if (\in_array(
            $action,
            [
                // This is impossible to handle generically in DcGeneral.
                'toggleFeatured',
                // DcGeneral handles sub palettes differently.
                'toggleSubpalette'
            ]
        )) {
            return;
        }

        if (\in_array(
            $action,
            [
                // Load nodes of the page structure tree. Compatible between 2.X and 3.X.
                'loadStructure',
                // Load nodes of the file manager tree.
                'loadFileManager',
                // Load nodes of the page tree.
                'loadPagetree',
                // Load nodes of the file tree.
                'loadFiletree',
                // Reload the page/file picker.
                'reloadPagetree',
                'reloadFiletree',
                'setLegendState'
            ]
        )) {
            $this->{$action}();
            return;
        }

        $ajax = new ContaoAjax($action);
        $ajax->executePreActions();
        $ajax->executePostActions(new DcCompat($this->getEnvironment(), $this->getActiveModel()));
    }
public function executePostActions(DataContainerInterface $container)
    {
        \header('Content-Type: text/html; charset=' . $GLOBALS['TL_CONFIG']['characterSet']);

        $this->objDc = $container;

        $action = $this->getEnvironment()->getInputProvider()->getValue('action');

        if (\in_array(
            $action,
            [
                // This is impossible to handle generically in DcGeneral.
                'toggleFeatured',
                // DcGeneral handles sub palettes differently.
                'toggleSubpalette'
            ]
        )) {
            return;
        }

        if (\in_array(
            $action,
            [
                // Load nodes of the page structure tree. Compatible between 2.X and 3.X.
                'loadStructure',
                // Load nodes of the file manager tree.
                'loadFileManager',
                // Load nodes of the page tree.
                'loadPagetree',
                // Load nodes of the file tree.
                'loadFiletree',
                // Reload the page/file picker.
                'reloadPagetree',
                'reloadFiletree',
                'setLegendState'
            ]
        )) {
            $this->{$action}();
            return;
        }

        $ajax = new ContaoAjax($action);
        $ajax->executePreActions();
        $ajax->executePostActions(new DcCompat($this->getEnvironment(), $this->getActiveModel()));
    }
public function executePostActions ( DataContainerInterface $ container ) { \ header ( 'Content-Type: text/html; charset=' . $ GLOBALS [ 'TL_CONFIG' ] [ 'characterSet' ] ) ; $ this -> objDc = $ container ; $ action = $ this -> getEnvironment ( ) -> getInputProvider ( ) -> getValue ( 'action' ) ; if ( \ in_array ( $ action , [ // This is impossible to handle generically in DcGeneral. 'toggleFeatured' , // DcGeneral handles sub palettes differently. 'toggleSubpalette' ] ) ) { return ; } if ( \ in_array ( $ action , [ // Load nodes of the page structure tree. Compatible between 2.X and 3.X. 'loadStructure' , // Load nodes of the file manager tree. 'loadFileManager' , // Load nodes of the page tree. 'loadPagetree' , // Load nodes of the file tree. 'loadFiletree' , // Reload the page/file picker. 'reloadPagetree' , 'reloadFiletree' , 'setLegendState' ] ) ) { $ this -> { $ action } ( ) ; return ; } $ ajax = new ContaoAjax ( $ action ) ; $ ajax -> executePreActions ( ) ; $ ajax -> executePostActions ( new DcCompat ( $ this -> getEnvironment ( ) , $ this -> getActiveModel ( ) ) ) ; }
Handle the post actions from DcGeneral.

@param DataContainerInterface $container The data container.

@return void

@SuppressWarnings(PHPMD.Superglobals)
@SuppressWarnings(PHPMD.CamelCaseVariableName)
Handle the post actions from DcGeneral .