TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
FullyRenderedButton Class Reference
Inheritance diagram for FullyRenderedButton:
ButtonInterface

Public Member Functions

 getHtmlSource ()
 
 setHtmlSource ($htmlSource)
 
 getType ()
 
 isValid ()
 
 __toString ()
 
 render ()
 

Protected Attributes

 $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 32 of file FullyRenderedButton.php.

Member Function Documentation

__toString ( )

Renders the button

Returns
string

Implements ButtonInterface.

Definition at line 97 of file FullyRenderedButton.php.

References FullyRenderedButton\render().

getHtmlSource ( )

Gets the HTML Source of the button

Returns
string

Definition at line 48 of file FullyRenderedButton.php.

References FullyRenderedButton\$htmlSource.

Referenced by FullyRenderedButton\isValid(), and FullyRenderedButton\render().

getType ( )

Gets the type of the button

Returns
string

Implements ButtonInterface.

Definition at line 71 of file FullyRenderedButton.php.

Referenced by FullyRenderedButton\isValid().

isValid ( )

Validator for a FullyRenderedButton

Returns
bool

Implements ButtonInterface.

Definition at line 81 of file FullyRenderedButton.php.

References FullyRenderedButton\getHtmlSource(), and FullyRenderedButton\getType().

render ( )

Renders the button

Returns
string

Implements ButtonInterface.

Definition at line 107 of file FullyRenderedButton.php.

References FullyRenderedButton\getHtmlSource().

Referenced by FullyRenderedButton\__toString().

setHtmlSource (   $htmlSource)

Sets the HTML Source of the button and returns itself

Parameters
string$htmlSourceHTML sourcecode of the button
Returns
FullyRenderedButton

Definition at line 60 of file FullyRenderedButton.php.

References FullyRenderedButton\$htmlSource.

Member Data Documentation

$htmlSource = ''
protected