PHP Class PhpSchool\CliMenu\MenuItem\MenuMenuItem

Author: Michael Woodward ([email protected])
Inheritance: implements PhpSchool\CliMenu\MenuItem\MenuItemInterface, use trait SelectableTrait
Afficher le fichier Open project: php-school/cli-menu Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( string $text, CliMenu $subMenu, boolean $disabled = false )
getSelectAction ( ) : callable Execute the items callable if required
getText ( ) : string Return the raw string of text
showSubMenu ( CliMenu $parentMenu ) Display the sub menu

Method Details

__construct() public méthode

public __construct ( string $text, CliMenu $subMenu, boolean $disabled = false )
$text string
$subMenu PhpSchool\CliMenu\CliMenu
$disabled boolean

getSelectAction() public méthode

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

getText() public méthode

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

showSubMenu() public méthode

Display the sub menu
public showSubMenu ( CliMenu $parentMenu )
$parentMenu PhpSchool\CliMenu\CliMenu