/** * {inheritDoc}. */ protected function createView($format, FlattenException $exception, $code, $parameters, Request $request, $showException) { $view = parent::createView($format, $exception, $code, $parameters, $request, $showException); if ($this->getViewHandler()->isFormatTemplating($format)) { $view->setTemplate($this->findTemplate($request, $format, $code, $showException)); $view->setData($parameters); } return $view; }
/** * @inheritdoc */ protected function createView(\Exception $exception, $code, array $templateData, Request $request, $showException) { $templateData['status_code'] = $exception->getCode() ?: $templateData['status_code']; return parent::createView($exception, $code, $templateData, $request, $showException); }