PHP Interface PhpSchool\CliMenu\MenuItem\MenuItemInterface

Author: Michael Woodward ([email protected])
Afficher le fichier Open project: php-school/cli-menu Interface Usage Examples

Méthodes publiques

Méthode Description
canSelect ( ) : boolean Can the item be selected
getRows ( MenuStyle $style, boolean $selected = false ) : array The output text for the item
getSelectAction ( ) : callable | void Execute the items callable if required
getText ( ) : string Return the raw string of text
hideItemExtra ( ) Disable showing item extra
showItemExtra ( ) Enable showing item extra
showsItemExtra ( ) : boolean Whether or not the menu item is showing the menustyle extra value

Method Details

canSelect() public méthode

Can the item be selected
public canSelect ( ) : boolean
Résultat boolean

getRows() public méthode

The output text for the item
public getRows ( MenuStyle $style, boolean $selected = false ) : array
$style PhpSchool\CliMenu\MenuStyle
$selected boolean
Résultat array

getSelectAction() public méthode

Execute the items callable if required
public getSelectAction ( ) : callable | void
Résultat callable | void

getText() public méthode

Return the raw string of text
public getText ( ) : string
Résultat string

hideItemExtra() public méthode

Disable showing item extra
public hideItemExtra ( )

showItemExtra() public méthode

Enable showing item extra
public showItemExtra ( )

showsItemExtra() public méthode

Whether or not the menu item is showing the menustyle extra value
public showsItemExtra ( ) : boolean
Résultat boolean