| 1 | <?php |
||
| 11 | class MenuMenuItem implements MenuItemInterface |
||
| 12 | { |
||
| 13 | use SelectableTrait; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var CliMenu |
||
| 17 | */ |
||
| 18 | private $subMenu; |
||
| 19 | |||
| 20 | public function __construct(string $text, CliMenu $subMenu, bool $disabled = false) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Execute the items callable if required |
||
| 29 | */ |
||
| 30 | public function getSelectAction() : ?callable |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Return the raw string of text |
||
| 37 | */ |
||
| 38 | public function getText() : string |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Set the raw string of text |
||
| 45 | */ |
||
| 46 | public function setText(string $text) : void |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Returns the sub menu |
||
| 53 | */ |
||
| 54 | public function getSubMenu() : CliMenu |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Display the sub menu |
||
| 61 | */ |
||
| 62 | public function showSubMenu(CliMenu $parentMenu) : void |
||
| 67 | } |
||
| 68 |