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

Public Member Functions

string getHtmlSource ()
 
FullyRenderedButton setHtmlSource ($htmlSource)
 
string getType ()
 
bool isValid ()
 
 __toString ()
 
string render ()
 

Protected Attributes

string $htmlSource = ''
 

Detailed Description

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);

Definition at line 33 of file FullyRenderedButton.php.

Member Function Documentation

◆ __toString()

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

◆ getHtmlSource()

string TYPO3\CMS\Backend\Template\Components\Buttons\FullyRenderedButton::getHtmlSource ( )

◆ getType()

string TYPO3\CMS\Backend\Template\Components\Buttons\FullyRenderedButton::getType ( )

◆ isValid()

bool TYPO3\CMS\Backend\Template\Components\Buttons\FullyRenderedButton::isValid ( )

◆ render()

string TYPO3\CMS\Backend\Template\Components\Buttons\FullyRenderedButton::render ( )

◆ setHtmlSource()

FullyRenderedButton TYPO3\CMS\Backend\Template\Components\Buttons\FullyRenderedButton::setHtmlSource (   $htmlSource)

Sets the HTML Source of the button and returns itself

Parameters
string$htmlSource‪HTML sourcecode of the button
Returns
FullyRenderedButton

Definition at line 60 of file FullyRenderedButton.php.

References TYPO3\CMS\Backend\Template\Components\Buttons\FullyRenderedButton\$htmlSource.

Member Data Documentation

◆ $htmlSource

string TYPO3\CMS\Backend\Template\Components\Buttons\FullyRenderedButton::$htmlSource = ''
protected

The full HTML source of the rendered button. This source will be passed through to the frontend as is, so keep htmlspecialchars() in mind

Definition at line 41 of file FullyRenderedButton.php.

Referenced by TYPO3\CMS\Backend\Template\Components\Buttons\FullyRenderedButton\getHtmlSource(), and TYPO3\CMS\Backend\Template\Components\Buttons\FullyRenderedButton\setHtmlSource().