forked from php-school/cli-menu
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenuItemInterface.php
More file actions
46 lines (37 loc) · 925 Bytes
/
Copy pathMenuItemInterface.php
File metadata and controls
46 lines (37 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace PhpSchool\CliMenu\MenuItem;
use PhpSchool\CliMenu\MenuStyle;
/**
* @author Michael Woodward <[email protected]>
*/
interface MenuItemInterface
{
/**
* The output text for the item
*/
public function getRows(MenuStyle $style, bool $selected = false) : array;
/**
* Return the raw string of text
*/
public function getText() : string;
/**
* Can the item be selected
*/
public function canSelect() : bool;
/**
* Execute the items callable if required
*/
public function getSelectAction() : ?callable;
/**
* Whether or not the menu item is showing the menustyle extra value
*/
public function showsItemExtra() : bool;
/**
* Enable showing item extra
*/
public function showItemExtra() : void;
/**
* Disable showing item extra
*/
public function hideItemExtra() : void;
}