ButtonBar

Bar holding the buttons

Table of Contents

Constants

BUTTON_POSITION_LEFT  = 'left'
Identifier for the left button bar
BUTTON_POSITION_RIGHT  = 'right'
Identifier for the right button bar

Properties

$buttons  : array<string|int, mixed>
Internal array of all registered buttons

Methods

addButton()  : $this
Add button
getButtons()  : array<string|int, mixed>
Returns an associative array of all buttons in the form of ButtonPosition > ButtonGroup > Button
makeButton()  : ButtonInterface
Creates a new button of the given type
makeFullyRenderedButton()  : FullyRenderedButton
Creates a new FullyRenderedButton
makeHelpButton()  : HelpButton
Creates a new HelpButton
makeInputButton()  : InputButton
Creates a new InputButton
makeLinkButton()  : LinkButton
Creates a new LinkButton
makeShortcutButton()  : ShortcutButton
Creates a new ShortcutButton
makeSplitButton()  : SplitButton
Creates a new SplitButton

Constants

BUTTON_POSITION_LEFT

Identifier for the left button bar

public mixed BUTTON_POSITION_LEFT = 'left'

BUTTON_POSITION_RIGHT

Identifier for the right button bar

public mixed BUTTON_POSITION_RIGHT = 'right'

Properties

$buttons

Internal array of all registered buttons

protected array<string|int, mixed> $buttons = []

Methods

addButton()

Add button

public addButton(ButtonInterface $button[, string $buttonPosition = self::BUTTON_POSITION_LEFT ][, int $buttonGroup = 1 ]) : $this
Parameters
$button : ButtonInterface

The Button Object to add

$buttonPosition : string = self::BUTTON_POSITION_LEFT

Position of the button (left/right)

$buttonGroup : int = 1

Buttongroup of the button

Tags
throws
InvalidArgumentException

In case a button is not valid

Return values
$this

getButtons()

Returns an associative array of all buttons in the form of ButtonPosition > ButtonGroup > Button

public getButtons() : array<string|int, mixed>
Return values
array<string|int, mixed>

makeButton()

Creates a new button of the given type

public makeButton(string $button) : ButtonInterface
Parameters
$button : string

ButtonClass to invoke. Must implement ButtonInterface

Tags
throws
InvalidArgumentException

In case a ButtonClass does not implement ButtonInterface

Return values
ButtonInterface

        
On this page

Search results