PHP Class PhpSchool\CliMenu\MenuItem\MenuMenuItem

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

Public Methods

Method 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 method

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

getSelectAction() public method

Execute the items callable if required
public getSelectAction ( ) : callable
return callable

getText() public method

Return the raw string of text
public getText ( ) : string
return string

showSubMenu() public method

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