Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function renderPageAction(string $url): Response |
||
16 | { |
||
17 | $em = $this->getDoctrine()->getManager(); |
||
18 | |||
19 | $page = $em->getRepository("RibsAdminBundle:Page")->findOneBy(["url" => $url]); |
||
20 | $navigation = $em->getRepository("RibsAdminBundle:Navigation")->findAllNavigation(); |
||
|
|||
21 | |||
22 | if ($page) { |
||
23 | return $this->render("@RibsAdmin/page.html.twig", ["page" => $page]); |
||
24 | } |
||
25 | |||
26 | throw new NotFoundHttpException("The required page does not exist"); |
||
27 | } |
||
29 |