Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | trait CanHide |
||
8 | { |
||
9 | /** |
||
10 | * @var Closure |
||
11 | */ |
||
12 | protected Closure $hideWhen; |
||
13 | |||
14 | /** |
||
15 | * Set hide condition for current menu item. |
||
16 | * |
||
17 | * @param Closure |
||
18 | * @return self |
||
19 | */ |
||
20 | public function hideWhen(Closure $callback): self |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * Determine whether the menu item is hidden. |
||
29 | * |
||
30 | * @return boolean |
||
31 | */ |
||
32 | public function hidden(): bool |
||
41 |