1 | <?php |
||
16 | class DropDown implements Jsonable |
||
17 | { |
||
18 | use Activate, Insertable, Linkable; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | public $slug; |
||
24 | |||
25 | /** |
||
26 | * @var string|null |
||
27 | */ |
||
28 | public $name; |
||
29 | |||
30 | /** |
||
31 | * @var bool |
||
32 | */ |
||
33 | public $activateWithLinks = true; |
||
34 | |||
35 | /** |
||
36 | * Construct a menu |
||
37 | * |
||
38 | * @param $dropDownName The name of the drop down |
||
39 | */ |
||
40 | public function __construct($dropDownName = null) |
||
48 | |||
49 | /** |
||
50 | * Check if the current object is a drop down |
||
51 | * |
||
52 | * @return bool |
||
53 | */ |
||
54 | public function isDropDown() |
||
58 | |||
59 | /** |
||
60 | * Check if the dropdown has links |
||
61 | * |
||
62 | * @return bool |
||
63 | */ |
||
64 | public function hasLinks() |
||
68 | |||
69 | /** |
||
70 | * This stops the drop down from becoming active |
||
71 | * because a child link is active. |
||
72 | */ |
||
73 | public function disableActiveParentage() |
||
77 | |||
78 | /** |
||
79 | * Check if the drop down should become active along |
||
80 | * with it's links. |
||
81 | */ |
||
82 | public function activeParentage() |
||
86 | |||
87 | /** |
||
88 | * Convert dropdown to JSON. |
||
89 | * |
||
90 | * @param int $options |
||
91 | * |
||
92 | * @return string |
||
93 | */ |
||
94 | public function toJson($options = 0) |
||
105 | } |
||
106 |