1 | <?php |
||
5 | class MenuItemHelper |
||
6 | { |
||
7 | /** |
||
8 | * Check if a menu item is a header. |
||
9 | * |
||
10 | * @param mixed $item |
||
11 | * @return boolean |
||
12 | */ |
||
13 | 4 | public static function isHeader($item) |
|
17 | |||
18 | /** |
||
19 | * Check if a menu item is a link. |
||
20 | * |
||
21 | * @param mixed $item |
||
22 | * @return boolean |
||
23 | */ |
||
24 | 4 | public static function isLink($item) |
|
29 | |||
30 | /** |
||
31 | * Check if a menu item is a search bar. |
||
32 | * |
||
33 | * @param mixed $item |
||
34 | * @return boolean |
||
35 | */ |
||
36 | 4 | public static function isSearchBar($item) |
|
42 | |||
43 | /** |
||
44 | * Check if a menu item is a submenu. |
||
45 | * |
||
46 | * @param mixed $item |
||
47 | * @return boolean |
||
48 | */ |
||
49 | 4 | public static function isSubmenu($item) |
|
55 | |||
56 | /** |
||
57 | * Check if a menu item is valid for the navbar. |
||
58 | * |
||
59 | * @param mixed $item |
||
60 | * @return boolean |
||
61 | */ |
||
62 | 4 | public static function isValidNavbarItem($item) |
|
66 | |||
67 | /** |
||
68 | * Check if a menu item is valid for the sidebar. |
||
69 | * |
||
70 | * @param mixed $item |
||
71 | * @return boolean |
||
72 | */ |
||
73 | 4 | public static function isValidSidebarItem($item) |
|
80 | |||
81 | /** |
||
82 | * Check if a menu item belongs to the left section of the navbar. |
||
83 | * |
||
84 | * @param mixed $item |
||
85 | * @return boolean |
||
86 | */ |
||
87 | 2 | public static function isNavbarLeftItem($item) |
|
93 | |||
94 | /** |
||
95 | * Check if a menu item belongs to the right section of the navbar. |
||
96 | * |
||
97 | * @param mixed $item |
||
98 | * @return boolean |
||
99 | */ |
||
100 | 3 | public static function isNavbarRightItem($item) |
|
106 | |||
107 | /** |
||
108 | * Check if a menu item belongs to the user menu section of the navbar. |
||
109 | * |
||
110 | * @param mixed $item |
||
111 | * @return boolean |
||
112 | */ |
||
113 | 3 | public static function isNavbarUserItem($item) |
|
119 | |||
120 | /** |
||
121 | * Check if a menu item belongs to the sidebar. |
||
122 | * |
||
123 | * @param mixed $item |
||
124 | * @return boolean |
||
125 | */ |
||
126 | 2 | public static function isSidebarItem($item) |
|
133 | } |
||
134 |