1 | <?php |
||
24 | class NavigationItem extends AbstractNode implements NavigationInterface { |
||
25 | |||
26 | /** |
||
27 | * Href. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | private $href; |
||
32 | |||
33 | /** |
||
34 | * Icon. |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | private $icon; |
||
39 | |||
40 | /** |
||
41 | * Constructor. |
||
42 | * |
||
43 | * @param string $id The id. |
||
44 | * @param string $icon The icon. |
||
45 | * @param string $href The href. |
||
46 | */ |
||
47 | public function __construct($id, $icon = null, $href = self::DEFAULT_HREF) { |
||
52 | |||
53 | /** |
||
54 | * Get the href. |
||
55 | * |
||
56 | * @return string Returns the href. |
||
57 | */ |
||
58 | public function getHref() { |
||
61 | |||
62 | /** |
||
63 | * Get the icon. |
||
64 | * |
||
65 | * @return string Returns the icon. |
||
66 | */ |
||
67 | public function getIcon() { |
||
70 | |||
71 | /** |
||
72 | * Set the href. |
||
73 | * |
||
74 | * @param string $href The href. |
||
75 | * @return NavigationItem Returns the navigation item. |
||
76 | */ |
||
77 | public function setHref($href) { |
||
81 | |||
82 | /** |
||
83 | * Set the icon. |
||
84 | * |
||
85 | * @param string $icon The icon. |
||
86 | * @return NavigationItem Returns the navigation item. |
||
87 | */ |
||
88 | public function setIcon($icon) { |
||
92 | |||
93 | /** |
||
94 | * Convert into an array representing this instance. |
||
95 | * |
||
96 | * @return array Returns an array representing this instance. |
||
97 | */ |
||
98 | public function toArray() { |
||
121 | |||
122 | } |
||
123 |