PSR-14 events

AllowedTagsEvent

The AllowedTagsEvent is responsible for the final list of allowed html tags that will appear in the dropdown.

$allowedTags

$allowedTags
Type
array
Required

true

The event holds an array with the allowed html tags

AllowedTagEvent Functions

addAllowedTag(string $tag)

addAllowedTag(string $tag)
Type
string
Required

true

Add a single tag to the list of allowed html tags

$event->addAllowedTag('abbr');
Copied!

removeAllowedTag(string $tag)

removeAllowedTag(string $tag)
Type
string
Required

true

Remove a single tag to the list of allowed html tags

$event->removeAllowedTag('abbr');
Copied!

setAllowedTags(array $allowedTags)

setAllowedTags(array $allowedTags)
Type
array
Required

true

Set the full list of allowed tags, overrides the default list

$event->setAllowedTags(['sup', 'abbr', 'strong']);
Copied!

getAllowedTags()

getAllowedTags()

Get the full list of allowed tags

$list = $event->getAllowedTags();
Copied!

__toString()

__toString()

Get the full list as a comma-separated string

$listString = (string)$event;
//or
$listString = $event->__toString();
Copied!

LabelFileEvent

The LabelFileEvent is responsible for the available labels in the TYPO3.lang variable

$labelFiles

$labelFiles
Type
array
Required

true

The event holds an array with references to language label files (xliff), e.g. EXT:my_ext/Resources/Private/Language/locallang.xlf

LabelFileEvent Functions

getLabelFiles()

getLabelFiles()

Get an array of language label files

$event->getLabelFiles();
Copied!

setLabelFiles(array $labelFiles)

setLabelFiles(array $labelFiles)

Set an array of language label files

$event->setLabelFiles([
    'EXT:my_ext/Resources/Private/Language/locallang.xlf',
    'EXT:my_ext/Resources/Private/Language/my_other_locallang.xlf',
]);
Copied!

addLabelFile(string $labelFile)

addLabelFile(string $labelFile)
Type
string
Required

true

Add a single language label file

$event->addLabelFile('EXT:my_ext/Resources/Private/Language/locallang.xlf');
Copied!

removeLabelFile(string $labelFile)

removeLabelFile(string $labelFile)
Type
string
Required

true

Remove a single language label file

$event->removeLabelFile('EXT:sup_header/Resources/Private/Language/locallang.xlf');
Copied!