| Total Complexity | 4 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 21 | class IndexController extends BaseDoctrineController |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * @Route("", name="index") |
||
| 25 | * |
||
| 26 | * @return \Symfony\Component\HttpFoundation\Response |
||
| 27 | */ |
||
| 28 | public function indexAction(Security $security) |
||
| 29 | { |
||
| 30 | $user = $security->getUser(); |
||
| 31 | if ($user !== null && \in_array('ROLE_ADMIN', $user->getRoles(), true)) { |
||
| 32 | return $this->redirectToRoute('administration'); |
||
| 33 | } |
||
| 34 | |||
| 35 | return $this->render('index/index.html.twig'); |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * no breadcrumbs on the index. |
||
| 40 | * |
||
| 41 | * @return \App\Model\Breadcrumb[]|array |
||
| 42 | */ |
||
| 43 | protected function getIndexBreadcrumbs() |
||
| 46 | } |
||
| 47 | } |
||
| 48 |