| 1 | <?php |
||
| 9 | abstract class AbstractLabelCommand extends AbstractCommand implements LabelSecurityInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var Label |
||
| 13 | */ |
||
| 14 | protected $label; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var bool |
||
| 18 | */ |
||
| 19 | private $alwaysAllowed = false; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param $itemId |
||
| 23 | * The id of the item that is targeted by the command. |
||
| 24 | * |
||
| 25 | * @param Label $label |
||
| 26 | * The label that is used in the command. |
||
| 27 | */ |
||
| 28 | public function __construct($itemId, Label $label) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param bool $alwaysAllowed |
||
| 37 | * @return AbstractLabelCommand |
||
| 38 | */ |
||
| 39 | public function withAlwaysAllowed($alwaysAllowed) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return string |
||
| 48 | */ |
||
| 49 | public function getItemId() |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return Label |
||
| 56 | */ |
||
| 57 | public function getLabel() |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @inheritdoc |
||
| 64 | */ |
||
| 65 | public function isIdentifiedByUuid() |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @inheritdoc |
||
| 72 | */ |
||
| 73 | public function getName() |
||
| 77 | |||
| 78 | /** |
||
| 79 | * @inheritdoc |
||
| 80 | */ |
||
| 81 | public function getUuid() |
||
| 85 | |||
| 86 | /** |
||
| 87 | * @inheritdoc |
||
| 88 | */ |
||
| 89 | public function isAlwaysAllowed() |
||
| 93 | } |
||
| 94 |