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

Public Member Functions

 setTag (string $tag)
 
 getTag ()
 
 getIcon ()
 
 setIcon (?Icon $icon)
 
 getLabel ()
 
 setLabel (?string $label)
 
 getTitle ()
 
 setTitle (?string $title)
 
 getHref ()
 
 setHref (?string $href)
 
 getClasses ()
 
 setClasses (string $classes)
 
 setAttributes (array $attributes)
 
 getShowLabelText ()
 
 setShowLabelText (bool $showLabelText)
 
 isValid ()
 
 getType ()
 
 render ()
 
 __toString ()
 

Public Attributes

array< string, function getAttributes():array { return $this-> attributes
 

Protected Member Functions

 getAttributesString ()
 

Protected Attributes

string $tag = 'button'
 
Icon $icon = null
 
string $label = ''
 
string $title = null
 
string $href = null
 
string $classes = ''
 
array $attributes = []
 
bool $showLabelText = false
 

Detailed Description

GenericButton

$button = GeneralUtility::makeInstance(GenericButton::class) ->setTag('a') ->setHref('#') ->setLabel('Label') ->setTitle('Title') ->setIcon($this->iconFactory->getIcon('actions-heart')) ->setAttributes(['data-value' => '123']);

Definition at line 33 of file GenericButton.php.

Member Function Documentation

◆ __toString()

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

◆ getAttributesString()

◆ getClasses()

TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::getClasses ( )

◆ getHref()

TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::getHref ( )

◆ getIcon()

◆ getLabel()

◆ getShowLabelText()

TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::getShowLabelText ( )

◆ getTag()

TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::getTag ( )

◆ getTitle()

TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::getTitle ( )

◆ getType()

TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::getType ( )

Returns the fully qualified class name of the button as a string

Returns
‪string

Implements TYPO3\CMS\Backend\Template\Components\Buttons\ButtonInterface.

Definition at line 146 of file GenericButton.php.

Referenced by TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton\isValid().

◆ isValid()

TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::isValid ( )

◆ render()

◆ setAttributes()

TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::setAttributes ( array  $attributes)

◆ setClasses()

TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::setClasses ( string  $classes)

◆ setHref()

TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::setHref ( ?string  $href)

◆ setIcon()

TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::setIcon ( ?Icon  $icon)

◆ setLabel()

TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::setLabel ( ?string  $label)

◆ setShowLabelText()

TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::setShowLabelText ( bool  $showLabelText)

◆ setTag()

TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::setTag ( string  $tag)

◆ setTitle()

TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::setTitle ( ?string  $title)

Member Data Documentation

◆ $attributes

array TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::$attributes = []
protected

◆ $classes

string TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::$classes = ''
protected

◆ $href

string TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::$href = null
protected

◆ $icon

Icon TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::$icon = null
protected

◆ $label

◆ $showLabelText

bool TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::$showLabelText = false
protected

◆ $tag

string TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::$tag = 'button'
protected

◆ $title

string TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::$title = null
protected

◆ attributes

array<string, function getAttributes(): array { return $this-> TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton::attributes
Returns
‪array<string, string>

Definition at line 125 of file GenericButton.php.

Referenced by TYPO3\CMS\Backend\Template\Components\Buttons\GenericButton\setAttributes().