1 | <?php |
||
16 | class Item extends Component |
||
17 | { |
||
18 | use TranslatorTrait; |
||
19 | |||
20 | /** |
||
21 | * @var Vault |
||
22 | */ |
||
23 | private $vault; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | private $target = ''; |
||
29 | |||
30 | /** |
||
31 | * @var array |
||
32 | */ |
||
33 | private $item = [ |
||
34 | 'title' => '', |
||
35 | 'badge' => '', |
||
36 | 'permission' => '', |
||
37 | ]; |
||
38 | |||
39 | /** |
||
40 | * @param string $target |
||
41 | * @param array $options |
||
42 | */ |
||
43 | public function __construct(Vault $vault, string $target, array $options) |
||
49 | |||
50 | /** |
||
51 | * @return string |
||
52 | */ |
||
53 | public function getTarget(): string |
||
57 | |||
58 | /** |
||
59 | * @return string |
||
60 | */ |
||
61 | public function getTitle(): string |
||
65 | |||
66 | /** |
||
67 | * @return UriInterface |
||
68 | */ |
||
69 | public function getUri(): UriInterface |
||
73 | |||
74 | /** |
||
75 | * Check if item is visible. |
||
76 | * |
||
77 | * @return bool |
||
78 | */ |
||
79 | public function isVisible(): bool |
||
92 | } |