Neos\Flow\Mvc\Controller\ActionController::initializeView PHP Method

initializeView() protected method

Override this method to solve assign variables common for all actions or prepare the view in another way before the action is called.
protected initializeView ( Neos\Flow\Mvc\View\ViewInterface $view ) : void
$view Neos\Flow\Mvc\View\ViewInterface The view to be initialized
return void
    protected function initializeView(ViewInterface $view)
    {
    }

Usage Example

 /**
  * @param ViewInterface $view
  * @return void
  */
 protected function initializeView(ViewInterface $view)
 {
     /** @var TemplateView $view */
     $view->setOption('templateRootPathPattern', '@packageResourcesPath/Private/');
     parent::initializeView($view);
 }