PHP Class PhpSchool\CliMenu\MenuItem\SelectableItem

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

Public Methods

Method Description
__construct ( string $text, callable $selectAction, boolean $showItemExtra = false, boolean $disabled = false )
getSelectAction ( ) : callable | void Execute the items callable if required
getText ( ) : string Return the raw string of text

Method Details

__construct() public method

public __construct ( string $text, callable $selectAction, boolean $showItemExtra = false, boolean $disabled = false )
$text string
$selectAction callable
$showItemExtra boolean
$disabled boolean

getSelectAction() public method

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

getText() public method

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