while upgrading to symfony 6.1
This commit is contained in:
@@ -10,6 +10,8 @@ use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class PagesController extends AbstractController
|
||||
{
|
||||
const TEMPLATE_DIR = 'themes/default/';
|
||||
|
||||
#[Route(path: '/pages/{name}', name: 'pages_display')]
|
||||
public function display(PagesRepository $pagesRepository, string $name): Response
|
||||
{
|
||||
@@ -27,4 +29,22 @@ class PagesController extends AbstractController
|
||||
'page' => $page,
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/imprint', name: 'app_imprint')]
|
||||
public function imprint(): Response
|
||||
{
|
||||
return $this->render(view: self::TEMPLATE_DIR . 'pages/imprint.html.twig', parameters: [
|
||||
'template_dir' => self::TEMPLATE_DIR,
|
||||
'controller_name' => 'PagesController',
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/privacy', name: 'app_privacy')]
|
||||
public function privacy(): Response
|
||||
{
|
||||
return $this->render(view: self::TEMPLATE_DIR . 'pages/privacy.html.twig', parameters: [
|
||||
'template_dir' => self::TEMPLATE_DIR,
|
||||
'controller_name' => 'PagesController',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user