Can be chained, so $this->view->assign(..., ...)->assign(..., ...); is possible
/** * 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(); }
/** * @param ViewInterface $view * @return void */ public function initializeView(ViewInterface $view) { $view->assign('asyncThumbnails', $this->asyncThumbnails); }
/** * @param ViewInterface $view * @return void */ protected function initializeView(ViewInterface $view) { $view->assign('moduleConfiguration', $this->moduleConfiguration); }