FullyRenderedButton implements ButtonInterface
FullyRenderedButton
This button type is an intermediate solution for buttons that are rendered by methods from TYPO3 itself, like the CSH buttons or Bookmark buttons.
There should be no need to use them, so do yourself a favour and don't.
EXAMPLE USAGE TO ADD A BUTTON TO THE FIRST BUTTON GROUP IN THE LEFT BAR:
$buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar(); $myButton = $buttonBar->makeFullyRenderedButton() ->setHtmlSource('<span class="i-should-not-be-using-this>Foo'); $buttonBar->addButton($myButton, ButtonBar::BUTTON_POSITION_LEFT, 1);
Table of Contents
Interfaces
- ButtonInterface
- Interface for buttons
Properties
- $htmlSource : string
- The full HTML source of the rendered button.
Methods
- __toString() : string
- Renders the button
- getHtmlSource() : string
- Gets the HTML Source of the button
- getType() : string
- Gets the type of the button
- isValid() : bool
- Validator for a FullyRenderedButton
- render() : string
- Renders the button
- setHtmlSource() : FullyRenderedButton
- Sets the HTML Source of the button and returns itself
Properties
$htmlSource
The full HTML source of the rendered button.
protected
string
$htmlSource
= ''
This source will be passed through to the frontend as is, so keep htmlspecialchars() in mind
Methods
__toString()
Renders the button
public
__toString() : string
Return values
stringgetHtmlSource()
Gets the HTML Source of the button
public
getHtmlSource() : string
Return values
stringgetType()
Gets the type of the button
public
getType() : string
Return values
stringisValid()
Validator for a FullyRenderedButton
public
isValid() : bool
Return values
boolrender()
Renders the button
public
render() : string
Return values
stringsetHtmlSource()
Sets the HTML Source of the button and returns itself
public
setHtmlSource(string $htmlSource) : FullyRenderedButton
Parameters
- $htmlSource : string
-
HTML sourcecode of the button