TYPO3
7.6
|
Public Member Functions | |
getName () | |
setName ($name) | |
getValue () | |
setValue ($value) | |
getForm () | |
setForm ($form) | |
isValid () | |
render () | |
__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 | |
$name = '' | |
$value = '' | |
$form = '' | |
Protected Attributes inherited from AbstractButton | |
$icon | |
$type | |
$showLabelText = false | |
Protected Attributes inherited from AbstractControl | |
$classes = '' | |
$title = '' | |
$dataAttributes = [] | |
$onClick = '' | |
This button type renders a HTML tag <button> and takes the HTML attributes name and value as additional attributes to those defined in AbstractButton.
Since we no longer want to have any <input type="submit"> in the TYPO3 core you should use this button type to send forms
EXAMPLE USAGE TO ADD A 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'); $buttonBar->addButton($saveButton, ButtonBar::BUTTON_POSITION_LEFT, 1);
Definition at line 36 of file InputButton.php.
__toString | ( | ) |
Magic method so Fluid can access a button via {button}
Implements ButtonInterface.
Definition at line 180 of file InputButton.php.
References InputButton\render().
getForm | ( | ) |
Definition at line 108 of file InputButton.php.
References InputButton\$form.
Referenced by InputButton\render().
getName | ( | ) |
Get name
Definition at line 64 of file InputButton.php.
References InputButton\$name.
Referenced by InputButton\isValid(), and InputButton\render().
getValue | ( | ) |
Get value
Definition at line 87 of file InputButton.php.
References InputButton\$value.
Referenced by InputButton\isValid(), and InputButton\render().
isValid | ( | ) |
Validates the current button
Implements ButtonInterface.
Definition at line 129 of file InputButton.php.
References AbstractButton\getIcon(), InputButton\getName(), AbstractControl\getTitle(), AbstractButton\getType(), and InputButton\getValue().
render | ( | ) |
Renders the markup of the button
Implements ButtonInterface.
Definition at line 148 of file InputButton.php.
References AbstractControl\$title, InputButton\$value, AbstractControl\getClasses(), InputButton\getForm(), AbstractButton\getIcon(), InputButton\getName(), AbstractControl\getTitle(), and InputButton\getValue().
Referenced by InputButton\__toString().
setForm | ( | $form | ) |
string | $form |
Definition at line 118 of file InputButton.php.
References InputButton\$form.
setName | ( | $name | ) |
Set name
string | $name | Name attribute |
Definition at line 76 of file InputButton.php.
References InputButton\$name.
setValue | ( | $value | ) |
Set value
string | $value | Value attribute |
Definition at line 99 of file InputButton.php.
References InputButton\$value.
|
protected |
Definition at line 57 of file InputButton.php.
Referenced by InputButton\getForm(), and InputButton\setForm().
|
protected |
Definition at line 43 of file InputButton.php.
Referenced by InputButton\getName(), and InputButton\setName().
|
protected |
Definition at line 50 of file InputButton.php.
Referenced by InputButton\getValue(), InputButton\render(), and InputButton\setValue().