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