FullyRenderedButton

class \TYPO3\CMS\Backend\Template\Components\Buttons\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:

$buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
$myButton = $buttonBar->makeFullyRenderedButton()
     ->setHtmlSource('<span class="i-should-not-be-using-this>Foo</span>');
$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

string

getHtmlSource()

Gets the HTML Source of the button

public getHtmlSource() : string

Return values

string

getType()

Gets the type of the button

public getType() : string

Return values

string

isValid()

Validator for a FullyRenderedButton

public isValid() : bool

Return values

bool

render()

Renders the button

public render() : string

Return values

string
On this page