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