ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
isItem.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
31interface isItem extends isGlobalScreenItem
32{
39 public function withVisibilityCallable(callable $is_visible): isItem;
40
44 public function isVisible(): bool;
45
53 public function withAvailableCallable(callable $is_available): isItem;
54
58 public function isAvailable(): bool;
59
69 public function withNonAvailableReason(Content|string $element): isItem;
70
74 public function getNonAvailableReason(): Content;
75
81 public function getPosition(): int;
82
87 public function withPosition(int $position): isItem;
88
92 public function isAlwaysAvailable(): bool;
93
98 public function withAlwaysAvailable(bool $always_active): isItem;
99
104 public function setTypeInformation(TypeInformation $information): isItem;
105
107
108 public function isTop(): bool;
109}
getPosition()
Return the default position for installation, this will be overridden by the configuration later.
setTypeInformation(TypeInformation $information)
withAvailableCallable(callable $is_available)
Pass a callable which can decide whether your element is available in general, e.g.
withNonAvailableReason(Content|string $element)
If your provider or the service which provides the Item does not allow to activate the item (.
withVisibilityCallable(callable $is_visible)
Pass a callable which can decide whether your element is visible for the current user.