Classes/Controller/StyleguideController.php
protected function initializeView(ViewInterface $view)
    {
        parent::initializeView($view);

        // Early return for actions without valid view like tcaCreateAction or tcaDeleteAction
        if (!($this->view instanceof BackendTemplateView)) {
            return;
        }

        // Hand over flash message queue to module template
        $this->view->getModuleTemplate()->setFlashMessageQueue($this->controllerContext->getFlashMessageQueue());
        $this->view->assign('actions', ['index', 'typography', 'tca', 'trees', 'tab', 'tables', 'avatar', 'buttons',
            'infobox', 'flashMessages', 'icons', 'debug', 'helpers', 'modal']);
        $this->view->assign('currentAction', $this->request->getControllerActionName());

        // Shortcut button
        $buttonBar = $this->view->getModuleTemplate()->getDocHeaderComponent()->getButtonBar();
        $getVars = $this->request->getArguments();
        $extensionName = $this->request->getControllerExtensionName();
        $moduleName = $this->request->getPluginName();
        if (count($getVars) === 0) {
            $modulePrefix = strtolower('tx_' . $extensionName . '_' . $moduleName);
            $getVars = array('id', 'M', $modulePrefix);
        }
        $shortcutButton = $buttonBar->makeShortcutButton()
            ->setModuleName($moduleName)
            ->setGetVariables($getVars);
        $buttonBar->addButton($shortcutButton);
    }
protected function initializeView(ViewInterface $view)
    {
        parent::initializeView($view);

        // Early return for actions without valid view like tcaCreateAction or tcaDeleteAction
        if (!($this->view instanceof BackendTemplateView)) {
            return;
        }

        // Hand over flash message queue to module template
        $this->view->getModuleTemplate()->setFlashMessageQueue($this->controllerContext->getFlashMessageQueue());
        $this->view->assign('actions', ['index', 'typography', 'tca', 'trees', 'tab', 'tables', 'avatar', 'buttons',
            'infobox', 'flashMessages', 'icons', 'debug', 'helpers', 'modal']);
        $this->view->assign('currentAction', $this->request->getControllerActionName());

        // Shortcut button
        $buttonBar = $this->view->getModuleTemplate()->getDocHeaderComponent()->getButtonBar();
        $getVars = $this->request->getArguments();
        $extensionName = $this->request->getControllerExtensionName();
        $moduleName = $this->request->getPluginName();
        if (count($getVars) === 0) {
            $modulePrefix = strtolower('tx_' . $extensionName . '_' . $moduleName);
            $getVars = array('id', 'M', $modulePrefix);
        }
        $shortcutButton = $buttonBar->makeShortcutButton()
            ->setModuleName($moduleName)
            ->setGetVariables($getVars);
        $buttonBar->addButton($shortcutButton);
    }
protected function initializeView ( ViewInterface $ view ) { parent :: initializeView ( $ view ) ; // Early return for actions without valid view like tcaCreateAction or tcaDeleteAction if ( ! ( $ this -> view instanceof BackendTemplateView ) ) { return ; } // Hand over flash message queue to module template $ this -> view -> getModuleTemplate ( ) -> setFlashMessageQueue ( $ this -> controllerContext -> getFlashMessageQueue ( ) ) ; $ this -> view -> assign ( 'actions' , [ 'index' , 'typography' , 'tca' , 'trees' , 'tab' , 'tables' , 'avatar' , 'buttons' , 'infobox' , 'flashMessages' , 'icons' , 'debug' , 'helpers' , 'modal' ] ) ; $ this -> view -> assign ( 'currentAction' , $ this -> request -> getControllerActionName ( ) ) ; // Shortcut button $ buttonBar = $ this -> view -> getModuleTemplate ( ) -> getDocHeaderComponent ( ) -> getButtonBar ( ) ; $ getVars = $ this -> request -> getArguments ( ) ; $ extensionName = $ this -> request -> getControllerExtensionName ( ) ; $ moduleName = $ this -> request -> getPluginName ( ) ; if ( count ( $ getVars ) === 0 ) { $ modulePrefix = strtolower ( 'tx_' . $ extensionName . '_' . $ moduleName ) ; $ getVars = array ( 'id' , 'M' , $ modulePrefix ) ; } $ shortcutButton = $ buttonBar -> makeShortcutButton ( ) -> setModuleName ( $ moduleName ) -> setGetVariables ( $ getVars ) ; $ buttonBar -> addButton ( $ shortcutButton ) ; }
Method is called before each action and sets up the doc header.

@param ViewInterface $view
Method is called before each action and sets up the doc header .