| Total Complexity | 2 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class NavigationRepository extends EntityRepository |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @return array |
||
| 11 | * function that return all navigation links of pages and modules |
||
| 12 | */ |
||
| 13 | public function findAllNavigation(): array |
||
| 14 | { |
||
| 15 | $query = $this->getEntityManager()->getConnection()->prepare("SELECT p.url, p.title, p.title_tag FROM navigation n |
||
| 16 | LEFT JOIN page p ON n.id_page = p.id AND p.displayed = 1 |
||
| 17 | LEFT JOIN module m ON n.id_module = m.id AND m.displayed = 1 |
||
| 18 | ORDER BY n.order ASC |
||
| 19 | "); |
||
| 20 | |||
| 21 | $query->execute(); |
||
| 22 | |||
| 23 | return $query->fetchAll(\PDO::FETCH_ASSOC); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return array |
||
| 28 | * function that return all navigation links of pages |
||
| 29 | */ |
||
| 30 | public function findAllNavigationPage(): array |
||
| 40 | } |
||
| 41 | } |