Neos\Flow\Mvc\View\ViewInterface::setControllerContext PHP Метод

setControllerContext() публичный Метод

Sets the current controller context
public setControllerContext ( ControllerContext $controllerContext ) : void
$controllerContext Neos\Flow\Mvc\Controller\ControllerContext Context of the controller associated with this view
Результат void
    public function setControllerContext(ControllerContext $controllerContext);

Usage Example

Пример #1
0
 /**
  * Handles a request. The result output is returned by altering the given response.
  *
  * @param RequestInterface $request The request object
  * @param ResponseInterface $response The response, modified by this handler
  * @return void
  * @throws UnsupportedRequestTypeException
  * @api
  */
 public function processRequest(RequestInterface $request, ResponseInterface $response)
 {
     $this->initializeController($request, $response);
     $this->actionMethodName = $this->resolveActionMethodName();
     $this->initializeActionMethodArguments();
     $this->initializeActionMethodValidators();
     $this->initializeAction();
     $actionInitializationMethodName = 'initialize' . ucfirst($this->actionMethodName);
     if (method_exists($this, $actionInitializationMethodName)) {
         call_user_func([$this, $actionInitializationMethodName]);
     }
     $this->mvcPropertyMappingConfigurationService->initializePropertyMappingConfigurationFromRequest($this->request, $this->arguments);
     $this->mapRequestArgumentsToControllerArguments();
     if ($this->view === null) {
         $this->view = $this->resolveView();
     }
     if ($this->view !== null) {
         $this->view->assign('settings', $this->settings);
         $this->view->setControllerContext($this->controllerContext);
         $this->initializeView($this->view);
     }
     $this->callActionMethod();
 }
All Usage Examples Of Neos\Flow\Mvc\View\ViewInterface::setControllerContext