2 namespace TYPO3\CMS\Fluid\Core\ViewHelper;
54 $this->
registerArgument(
'additionalAttributes',
'array',
'Additional tag attributes. They will be added directly to the resulting HTML tag.',
false);
55 $this->
registerArgument(
'data',
'array',
'Additional data-* attributes. They will each be added with a "data-" prefix.',
false);
72 $this->tag->setTagName($this->tagName);
73 if ($this->
hasArgument(
'additionalAttributes') && is_array($this->arguments[
'additionalAttributes'])) {
74 $this->tag->addAttributes($this->arguments[
'additionalAttributes']);
77 if ($this->
hasArgument(
'data') && is_array($this->arguments[
'data'])) {
78 foreach ($this->arguments[
'data'] as $dataAttributeKey => $dataAttributeValue) {
79 $this->tag->addAttribute(
'data-' . $dataAttributeKey, $dataAttributeValue);
83 if (isset(self::$tagAttributes[get_class($this)])) {
84 foreach (self::$tagAttributes[get_class($this)] as $attributeName) {
85 if ($this->
hasArgument($attributeName) && $this->arguments[$attributeName] !==
'') {
86 $this->tag->addAttribute($attributeName, $this->arguments[$attributeName]);
106 self::$tagAttributes[get_class($this)][$name] = $name;
119 $this->
registerTagAttribute(
'dir',
'string',
'Text direction for this HTML element. Allowed strings: "ltr" (left to right), "rtl" (right to left)');
120 $this->
registerTagAttribute(
'id',
'string',
'Unique (in this file) identifier for this HTML element.');
121 $this->
registerTagAttribute(
'lang',
'string',
'Language for this element. Use short names specified in RFC 1766');