Total Complexity | 3 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | class Includes extends Model |
||
14 | { |
||
15 | /** |
||
16 | * get all the menu elements from the database |
||
17 | * @return array the categories and access URL |
||
18 | * @throws \ReflectionException |
||
19 | */ |
||
20 | public function getMenu(): array |
||
21 | { |
||
22 | $data = []; |
||
23 | //get the categories from database |
||
24 | $categories = $this->getResultSet('categories'); |
||
25 | foreach ( $categories as $category) { |
||
26 | $data +=[ |
||
27 | $category['category_name'] => '/category/'.$category['categories_slug'] |
||
28 | ]; |
||
29 | } |
||
30 | return $data; |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Gets the Jumbotron elements |
||
35 | * @return array |
||
36 | */ |
||
37 | public function getJumbotron(): array |
||
41 | } |
||
42 | |||
43 | } |