Neos\Flow\Mvc\Controller\ActionController::processRequest PHP Méthode

processRequest() public méthode

Handles a request. The result output is returned by altering the given response.
public processRequest ( Neos\Flow\Mvc\RequestInterface $request, Neos\Flow\Mvc\ResponseInterface $response ) : void
$request Neos\Flow\Mvc\RequestInterface The request object
$response Neos\Flow\Mvc\ResponseInterface The response, modified by this handler
Résultat void
    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();
    }

Usage Example

 /**
  * 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 WidgetContextNotFoundException
  * @api
  */
 public function processRequest(RequestInterface $request, ResponseInterface $response)
 {
     /** @var $request \Neos\Flow\Mvc\ActionRequest */
     /** @var $widgetContext WidgetContext */
     $widgetContext = $request->getInternalArgument('__widgetContext');
     if ($widgetContext === null) {
         throw new WidgetContextNotFoundException('The widget context could not be found in the request.', 1307450180);
     }
     $this->widgetConfiguration = $widgetContext->getWidgetConfiguration();
     parent::processRequest($request, $response);
 }
All Usage Examples Of Neos\Flow\Mvc\Controller\ActionController::processRequest