PHP Class PhpSchool\CliMenu\MenuItem\StaticItem

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

Public Methods

Method Description
__construct ( string $text )
canSelect ( ) : boolean Can the item be selected
getRows ( MenuStyle $style, boolean $selected = false ) : array The output text for the item
getSelectAction ( ) : 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

__construct() public method

public __construct ( string $text )
$text string

canSelect() public method

Can the item be selected
public canSelect ( ) : boolean
return boolean

getRows() public method

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

getSelectAction() public method

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

getText() public method

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

hideItemExtra() public method

Disable showing item extra
public hideItemExtra ( )

showItemExtra() public method

Enable showing item extra
public showItemExtra ( )

showsItemExtra() public method

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