view = $view; $this->translator = $translator; $this->logger = $logger; $this->flash = $flash; } public function __invoke(Request $request, Response $response, $args) { return $this->view->render($response, 'error.twig', [ 'title' => $this->translator->trans('error.403.title'), 'content' => $this->translator->trans('error.403.content') ]); } }