cleanup default controller

This commit is contained in:
Simon Vieille 2021-03-29 14:18:42 +02:00
parent 0dff733727
commit 32cb737f6b

View file

@ -19,13 +19,13 @@ class PageController extends AbstractController
$this->siteStore = $siteStore; $this->siteStore = $siteStore;
} }
public function show(Request $request, SiteRequest $siteRequest): Response public function show(): Response
{ {
if (!$siteRequest->getPage()) { if (!$this->siteRequest->getPage()) {
throw $this->createNotFoundException(); throw $this->createNotFoundException();
} }
return $this->defaultRender($siteRequest->getPage()->getTemplate()); return $this->defaultRender($this->siteRequest->getPage()->getTemplate());
} }
protected function defaultRender(string $view, array $parameters = [], Response $response = null): Response protected function defaultRender(string $view, array $parameters = [], Response $response = null): Response