1 | <?php |
||
14 | class Link implements Jsonable |
||
15 | { |
||
16 | use Activate, Insertable; |
||
17 | |||
18 | /** |
||
19 | * The link slug |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | public $slug; |
||
24 | |||
25 | /** |
||
26 | * Name of the link |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | public $name; |
||
31 | |||
32 | /** |
||
33 | * Link url |
||
34 | * |
||
35 | * @var string |
||
36 | */ |
||
37 | public $url; |
||
38 | |||
39 | /** |
||
40 | * Additional options for links |
||
41 | * |
||
42 | * @var array |
||
43 | */ |
||
44 | public $options = []; |
||
45 | |||
46 | /** |
||
47 | * Get a menu option |
||
48 | * |
||
49 | * @param $name The name of the menu option |
||
50 | * |
||
51 | * @return string|bool Return the menu option if it exists or false. |
||
52 | */ |
||
53 | public function getOption($name) |
||
61 | |||
62 | /** |
||
63 | * Check if the current object is a drop down |
||
64 | * |
||
65 | * @return bool |
||
66 | */ |
||
67 | public function isDropDown() |
||
71 | |||
72 | /** |
||
73 | * Convert link to JSON. |
||
74 | * |
||
75 | * @param int $options |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | public function toJson($options = 0) |
||
86 | } |
||
87 |