TYPO3  7.6
Public Member Functions | Public Attributes | Protected Attributes | List of all members
ButtonBar Class Reference

Public Member Functions

 addButton (ButtonInterface $button, $buttonPosition=self::BUTTON_POSITION_LEFT, $buttonGroup=1)
 
 makeButton ($button)
 
 makeInputButton ()
 
 makeSplitButton ()
 
 makeLinkButton ()
 
 makeFullyRenderedButton ()
 
 makeShortcutButton ()
 
 makeHelpButton ()
 
 getButtons ()
 

Public Attributes

const BUTTON_POSITION_LEFT = 'left'
 
const BUTTON_POSITION_RIGHT = 'right'
 

Protected Attributes

 $buttons = []
 

Detailed Description

Bar holding the buttons

Definition at line 30 of file ButtonBar.php.

Member Function Documentation

addButton ( ButtonInterface  $button,
  $buttonPosition = self::BUTTON_POSITION_LEFT,
  $buttonGroup = 1 
)

Add button

Parameters
ButtonInterface$buttonThe Button Object to add
string$buttonPositionPosition of the button (left/right)
int$buttonGroupButtongroup of the button
Exceptions
\InvalidArgumentExceptionIn case a button is not valid
Returns
$this

Definition at line 60 of file ButtonBar.php.

References ButtonInterface\getType(), and ButtonInterface\isValid().

getButtons ( )

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

Returns
array

Definition at line 162 of file ButtonBar.php.

References ButtonBar\$buttons, $GLOBALS, and GeneralUtility\callUserFunction().

makeButton (   $button)

Creates a new button of the given type

Parameters
string$buttonButtonClass to invoke. Must implement ButtonInterface
Exceptions
\InvalidArgumentExceptionIn case a ButtonClass does not implement ButtonInterface
Returns
ButtonInterface

Definition at line 88 of file ButtonBar.php.

References GeneralUtility\makeInstance().

makeFullyRenderedButton ( )

Creates a new FullyRenderedButton

Returns
FullyRenderedButton

Definition at line 131 of file ButtonBar.php.

References GeneralUtility\makeInstance().

makeHelpButton ( )

Creates a new HelpButton

Returns
HelpButton

Definition at line 151 of file ButtonBar.php.

References GeneralUtility\makeInstance().

makeInputButton ( )

Creates a new InputButton

Returns
InputButton

Definition at line 101 of file ButtonBar.php.

References GeneralUtility\makeInstance().

makeLinkButton ( )

Creates a new LinkButton

Returns
LinkButton

Definition at line 121 of file ButtonBar.php.

References GeneralUtility\makeInstance().

makeShortcutButton ( )

Creates a new ShortcutButton

Returns
ShortcutButton

Definition at line 141 of file ButtonBar.php.

References GeneralUtility\makeInstance().

makeSplitButton ( )

Creates a new SplitButton

Returns
SplitButton

Definition at line 111 of file ButtonBar.php.

References GeneralUtility\makeInstance().

Member Data Documentation

$buttons = []
protected

Definition at line 47 of file ButtonBar.php.

Referenced by ButtonBar\getButtons().

const BUTTON_POSITION_LEFT = 'left'
const BUTTON_POSITION_RIGHT = 'right'