TYPO3
7.6
|
Public Member Functions | |
addItem (AbstractButton $item, $primaryAction=false) | |
getButton () | |
isValid () | |
__toString () | |
Public Member Functions inherited from AbstractButton | |
getShowLabelText () | |
setShowLabelText ($showLabelText) | |
getIcon () | |
getType () | |
setIcon (Icon $icon) | |
isValid () | |
__toString () | |
render () | |
Public Member Functions inherited from AbstractControl | |
getClasses () | |
getTitle () | |
getDataAttributes () | |
getOnClick () | |
setClasses ($classes) | |
setTitle ($title) | |
setDataAttributes (array $dataAttributes) | |
setOnClick ($onClick) | |
Protected Attributes | |
$containsPrimaryAction = false | |
$items = [] | |
Protected Attributes inherited from AbstractButton | |
$icon | |
$type | |
$showLabelText = false | |
Protected Attributes inherited from AbstractControl | |
$classes = '' | |
$title = '' | |
$dataAttributes = [] | |
$onClick = '' | |
This button type renders a bootstrap split button. It takes multiple button objects as parameters
EXAMPLE USAGE TO ADD A SPLIT BUTTON TO THE FIRST BUTTON GROUP IN THE LEFT BAR:
$buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
$saveButton = $buttonBar->makeInputButton() ->setName('save') ->setValue('1') ->setIcon($this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)) ->setTitle('Save');
$saveAndCloseButton = $buttonBar->makeInputButton() ->setName('save_and_close') ->setValue('1') ->setTitle('Save and close') ->setIcon($this->iconFactory->getIcon('actions-document-save-close', Icon::SIZE_SMALL));
$saveAndShowPageButton = $buttonBar->makeInputButton() ->setName('save_and_show') ->setValue('1') ->setTitle('Save and show') ->setIcon($this->iconFactory->getIcon('actions-document-save-view', Icon::SIZE_SMALL));
$splitButtonElement = $buttonBar->makeSplitButton() ->addItem($saveButton, TRUE) ->addItem($saveAndCloseButton) ->addItem($saveAndShowPageButton);
Definition at line 50 of file SplitButton.php.
__toString | ( | ) |
Magic method so Fluid can access a button via {button}
Implements ButtonInterface.
Definition at line 204 of file SplitButton.php.
References AbstractButton\render().
addItem | ( | AbstractButton | $item, |
$primaryAction = false |
|||
) |
Adds an instance of any button to the split button
AbstractButton | $item | ButtonObject to add |
bool | $primaryAction | Is the button the primary action? |
\InvalidArgumentException | In case a button is not valid |
Definition at line 77 of file SplitButton.php.
References AbstractButton\getType(), and AbstractButton\isValid().
getButton | ( | ) |
Returns the current button
Definition at line 104 of file SplitButton.php.
References SplitButton\$items.
Referenced by SplitButton\isValid().
isValid | ( | ) |
Validates the current button
Implements ButtonInterface.
Definition at line 119 of file SplitButton.php.
References SplitButton\getButton().
|
protected |
Definition at line 58 of file SplitButton.php.
|
protected |
Definition at line 65 of file SplitButton.php.
Referenced by SplitButton\getButton().