1 | <?php |
||||
2 | |||||
3 | namespace PiouPiou\RibsAdminBundle\Repository; |
||||
4 | |||||
5 | use Doctrine\DBAL\DBALException; |
||||
6 | use Doctrine\ORM\EntityRepository; |
||||
7 | |||||
8 | class NavigationRepository extends EntityRepository |
||||
9 | { |
||||
10 | /** |
||||
11 | * function that return all navigation links of pages and modules |
||||
12 | * @return array |
||||
13 | * @throws DBALException |
||||
14 | */ |
||||
15 | public function findAllNavigation(): array |
||||
16 | { |
||||
17 | $query = $this->getEntityManager()->getConnection()->prepare("SELECT p.url, p.title, p.title_tag FROM navigation n |
||||
18 | LEFT JOIN page p ON n.id_page = p.id AND p.displayed = 1 |
||||
19 | LEFT JOIN module m ON n.id_module = m.id AND m.displayed = 1 |
||||
20 | ORDER BY n.order ASC |
||||
21 | "); |
||||
22 | |||||
23 | $query->execute(); |
||||
24 | |||||
25 | return $query->fetchAll(\PDO::FETCH_ASSOC); |
||||
0 ignored issues
–
show
|
|||||
26 | } |
||||
27 | |||||
28 | /** |
||||
29 | * function that return all navigation links of pages |
||||
30 | * @return array |
||||
31 | * @throws DBALException |
||||
32 | */ |
||||
33 | public function findAllNavigationPage(): array |
||||
34 | { |
||||
35 | $query = $this->getEntityManager()->getConnection()->prepare("SELECT p.id, p.url, p.title, p.title_tag FROM navigation n |
||||
36 | INNER JOIN page p ON n.id_page = p.id AND p.displayed = 1 |
||||
37 | ORDER BY n.order ASC |
||||
38 | "); |
||||
39 | |||||
40 | $query->execute(); |
||||
41 | |||||
42 | return $query->fetchAll(\PDO::FETCH_ASSOC); |
||||
0 ignored issues
–
show
The function
Doctrine\DBAL\Statement::fetchAll() has been deprecated: Use fetchAllNumeric(), fetchAllAssociative() or fetchFirstColumn() instead.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead. ![]() |
|||||
43 | } |
||||
44 | } |
||||
45 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.