‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Template\Components\Buttons\InputButton Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Template\Components\Buttons\InputButton:
TYPO3\CMS\Backend\Template\Components\Buttons\AbstractButton TYPO3\CMS\Backend\Template\Components\AbstractControl TYPO3\CMS\Backend\Template\Components\Buttons\ButtonInterface

Public Member Functions

string getName ()
 
InputButton setName ($name)
 
string getValue ()
 
InputButton setValue ($value)
 
string getForm ()
 
InputButton setForm ($form)
 
bool isValid ()
 
string render ()
 
 __toString ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Backend\Template\Components\Buttons\AbstractButton
bool getShowLabelText ()
 
$this setShowLabelText ($showLabelText)
 
Icon getIcon ()
 
string getType ()
 
$this setIcon (Icon $icon)
 
 isDisabled ()
 
 setDisabled (bool $disabled)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Backend\Template\Components\AbstractControl
string getClasses ()
 
string getTitle ()
 
array getDataAttributes ()
 
$this setClasses ($classes)
 
$this setTitle ($title)
 
$this setDataAttributes (array $dataAttributes)
 

Protected Attributes

string $name = ''
 
string $value = ''
 
string $form = ''
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Backend\Template\Components\Buttons\AbstractButton
Icon $icon
 
bool $showLabelText = false
 
bool $disabled = false
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Backend\Template\Components\AbstractControl
string $classes = ''
 
string $title = ''
 
array $dataAttributes = array( )
 

Detailed Description

InputButton

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', IconSize::SMALL)) ->setTitle('Save'); $buttonBar->addButton($saveButton, ButtonBar::BUTTON_POSITION_LEFT, 1);

Definition at line 39 of file InputButton.php.

Member Function Documentation

◆ __toString()

TYPO3\CMS\Backend\Template\Components\Buttons\InputButton::__toString ( )

Magic method so Fluid can access a button via {button}

Reimplemented from TYPO3\CMS\Backend\Template\Components\Buttons\AbstractButton.

Definition at line 177 of file InputButton.php.

References TYPO3\CMS\Backend\Template\Components\Buttons\InputButton\render().

◆ getForm()

string TYPO3\CMS\Backend\Template\Components\Buttons\InputButton::getForm ( )

◆ getName()

string TYPO3\CMS\Backend\Template\Components\Buttons\InputButton::getName ( )

◆ getValue()

string TYPO3\CMS\Backend\Template\Components\Buttons\InputButton::getValue ( )

◆ isValid()

◆ render()

◆ setForm()

InputButton TYPO3\CMS\Backend\Template\Components\Buttons\InputButton::setForm (   $form)

◆ setName()

InputButton TYPO3\CMS\Backend\Template\Components\Buttons\InputButton::setName (   $name)

Set name

Parameters
string$name‪Name attribute
Returns
InputButton

Definition at line 76 of file InputButton.php.

References TYPO3\CMS\Backend\Template\Components\Buttons\InputButton\$name.

◆ setValue()

InputButton TYPO3\CMS\Backend\Template\Components\Buttons\InputButton::setValue (   $value)

Set value

Parameters
string$value‪Value attribute
Returns
InputButton

Definition at line 99 of file InputButton.php.

References TYPO3\CMS\Backend\Template\Components\Buttons\InputButton\$value.

Member Data Documentation

◆ $form

string TYPO3\CMS\Backend\Template\Components\Buttons\InputButton::$form = ''
protected

◆ $name

string TYPO3\CMS\Backend\Template\Components\Buttons\InputButton::$name = ''
protected

◆ $value

string TYPO3\CMS\Backend\Template\Components\Buttons\InputButton::$value = ''
protected