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

Public Member Functions

string getHref ()
 
LinkButton setHref ($href)
 
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 $href = ''
 
- ‪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

LinkButton

This button type renders a regular anchor tag with TYPO3s way to render a button control.

EXAMPLE USAGE TO ADD A BUTTON TO THE FIRST BUTTON GROUP IN THE LEFT BAR:

$buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar(); $saveButton = $buttonBar->makeLinkButton() ->setHref('#') ->setDataAttributes([ 'foo' => 'bar' ]) ->setIcon($this->iconFactory->getIcon('actions-document-save', IconSize::SMALL)) ->setTitle('Save'); $buttonBar->addButton($saveButton, ButtonBar::BUTTON_POSITION_LEFT, 1);

Definition at line 38 of file LinkButton.php.

Member Function Documentation

◆ __toString()

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

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

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

Definition at line 120 of file LinkButton.php.

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

◆ getHref()

string TYPO3\CMS\Backend\Template\Components\Buttons\LinkButton::getHref ( )

◆ isValid()

◆ render()

◆ setHref()

Member Data Documentation

◆ $href

string TYPO3\CMS\Backend\Template\Components\Buttons\LinkButton::$href = ''
protected