AbstractControl

Control used by various components

Table of Contents

Properties

$classes  : string
HTML tag attribute for class
$dataAttributes  : array<string|int, mixed>
HTML tag attributes for data-* Use key => value pairs
$onClick  : string
HTML tag attribute onClick Outdated, use sparingly
$title  : string
HTML tag attribute for title

Methods

getClasses()  : string
Get classes
getDataAttributes()  : array<string|int, mixed>
Get Data attributes
getOnClick()  : string
Get Onclick Attribute
getTitle()  : string
Get Title
hasOnClick()  : bool
Helper method to avoid using `getOnClick` in TYPO3 core.
setClasses()  : $this
Set classes
setDataAttributes()  : $this
Set Data attributes
setOnClick()  : $this
Set OnClick
setTitle()  : $this
Set title attribute

Properties

$classes

HTML tag attribute for class

protected string $classes = ''

$dataAttributes

HTML tag attributes for data-* Use key => value pairs

protected array<string|int, mixed> $dataAttributes = []

$onClick

HTML tag attribute onClick Outdated, use sparingly

Deprecated

Use HTML data attrs for GlobalEventHandler or ActionDispatcher instead. Will be removed in TYPO3 v12.0

protected string $onClick = ''

$title

HTML tag attribute for title

protected string $title = ''

Methods

getClasses()

Get classes

public getClasses() : string
Return values
string

getDataAttributes()

Get Data attributes

public getDataAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getOnClick()

Get Onclick Attribute

public getOnClick() : string
Deprecated

Use HTML data attrs for GlobalEventHandler or ActionDispatcher instead. Will be removed in TYPO3 v12.0

Return values
string

getTitle()

Get Title

public getTitle() : string
Return values
string

hasOnClick()

Helper method to avoid using `getOnClick` in TYPO3 core.

public hasOnClick() : bool
Deprecated

Introduced with TYPO3 v11.5, will be removed with TYPO3 v12.0

Internal

Basically just to be used by the TYPO3 core, not to be used in extensions.

Return values
bool

setClasses()

Set classes

public setClasses(string $classes) : $this
Parameters
$classes : string

HTML class attribute to set

Return values
$this

setDataAttributes()

Set Data attributes

public setDataAttributes(array<string|int, mixed> $dataAttributes) : $this
Parameters
$dataAttributes : array<string|int, mixed>

HTML data attributes to set

Return values
$this

setOnClick()

Set OnClick

public setOnClick(string $onClick) : $this
Deprecated

Use HTML data attrs for GlobalEventHandler or ActionDispatcher instead. Will be removed in TYPO3 v12.0

Parameters
$onClick : string

HTML onClick attribute to set

Return values
$this

setTitle()

Set title attribute

public setTitle(string $title) : $this
Parameters
$title : string

HTML title attribute to set

Return values
$this

        
On this page

Search results