PHP Интерфейс PhpSchool\CliMenu\MenuItem\MenuItemInterface

Автор: Michael Woodward ([email protected])
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
canSelect ( ) : boolean Can the item be selected
getRows ( MenuStyle $style, boolean $selected = false ) : array The output text for the item
getSelectAction ( ) : callable | 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

Описание методов

canSelect() публичный Метод

Can the item be selected
public canSelect ( ) : boolean
Результат boolean

getRows() публичный Метод

The output text for the item
public getRows ( MenuStyle $style, boolean $selected = false ) : array
$style PhpSchool\CliMenu\MenuStyle
$selected boolean
Результат array

getSelectAction() публичный Метод

Execute the items callable if required
public getSelectAction ( ) : callable | void
Результат callable | void

getText() публичный Метод

Return the raw string of text
public getText ( ) : string
Результат string

hideItemExtra() публичный Метод

Disable showing item extra
public hideItemExtra ( )

showItemExtra() публичный Метод

Enable showing item extra
public showItemExtra ( )

showsItemExtra() публичный Метод

Whether or not the menu item is showing the menustyle extra value
public showsItemExtra ( ) : boolean
Результат boolean