PHP Class PhpSchool\CliMenu\MenuItem\SelectableItem

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, 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 méthode

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

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