TYPO3
7.6
|
Public Member Functions | |
getHref () | |
setHref ($href) | |
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 | |
$href = '' | |
Protected Attributes inherited from AbstractButton | |
$icon | |
$type | |
$showLabelText = false | |
Protected Attributes inherited from AbstractControl | |
$classes = '' | |
$title = '' | |
$dataAttributes = [] | |
$onClick = '' | |
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', Icon::SIZE_SMALL)) ->setTitle('Save'); $buttonBar->addButton($saveButton, ButtonBar::BUTTON_POSITION_LEFT, 1);
Definition at line 35 of file LinkButton.php.
__toString | ( | ) |
Magic method so Fluid can access a button via {button}
Implements ButtonInterface.
Definition at line 122 of file LinkButton.php.
References LinkButton\render().
getHref | ( | ) |
Get href
Definition at line 49 of file LinkButton.php.
References LinkButton\$href.
Referenced by LinkButton\isValid(), and LinkButton\render().
isValid | ( | ) |
Validates the current button
Implements ButtonInterface.
Definition at line 72 of file LinkButton.php.
References LinkButton\getHref(), AbstractButton\getIcon(), AbstractControl\getTitle(), and AbstractButton\getType().
render | ( | ) |
Renders the markup for the button
Implements ButtonInterface.
Definition at line 90 of file LinkButton.php.
References AbstractControl\$onClick, AbstractControl\$title, AbstractControl\getClasses(), LinkButton\getHref(), AbstractButton\getIcon(), and AbstractControl\getTitle().
Referenced by LinkButton\__toString().
setHref | ( | $href | ) |
Set href
string | $href | HREF attribute |
Definition at line 61 of file LinkButton.php.
References LinkButton\$href.
|
protected |
Definition at line 42 of file LinkButton.php.
Referenced by LinkButton\getHref(), and LinkButton\setHref().