/** * Dispatches a request to a controller and initializes the security framework. * * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface $request The request to dispatch * @param \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response The response, to be modified by the controller * @throws Exception\InfiniteLoopException * @return void */ public function dispatch(\TYPO3\CMS\Extbase\Mvc\RequestInterface $request, \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response) { $dispatchLoopCount = 0; while (!$request->isDispatched()) { if ($dispatchLoopCount++ > 99) { throw new \TYPO3\CMS\Extbase\Mvc\Exception\InfiniteLoopException('Could not ultimately dispatch the request after ' . $dispatchLoopCount . ' iterations. Most probably, a @ignorevalidation or @dontvalidate (old propertymapper) annotation is missing on re-displaying a form with validation errors.', 1217839467); } $controller = $this->resolveController($request); try { $controller->processRequest($request, $response); } catch (\TYPO3\CMS\Extbase\Mvc\Exception\StopActionException $ignoredException) { } } $this->emitAfterRequestDispatchSignal($request, $response); }