PHP Class PhpSchool\CliMenu\MenuItem\AsciiArtItem

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

Public Methods

Method Description
__construct ( string $text, string $position = self::POSITION_CENTER )
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, string $position = self::POSITION_CENTER )
$text string
$position 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