| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 41 | #[Route('/{id}/preview', name: 'admin_page_preview', methods: ['GET'])] |
||
| 42 | #[IsGranted('ROLE_ADMIN')] |
||
| 43 | public function preview(int $id, PageRepository $pageRepo): Response |
||
| 44 | { |
||
| 45 | $page = $pageRepo->find($id); |
||
| 46 | |||
| 47 | if (!$page) { |
||
| 48 | throw $this->createNotFoundException('Page not found'); |
||
| 49 | } |
||
| 50 | |||
| 51 | return $this->render('@ChamiloCore/Page/preview.html.twig', [ |
||
| 52 | 'page' => $page, |
||
| 53 | ]); |
||
| 56 |