` group. * * ``` * * * * * * ... * * * ``` * * **NOTE**: This ViewHelper is experimental and tailored to be used only in extbase context. * * @see https://docs.typo3.org/permalink/t3viewhelper:typo3-fluid-be-menus-actionmenuitemgroup */ final class ActionMenuItemGroupViewHelper extends AbstractTagBasedViewHelper { /** * @var string */ protected $tagName = 'optgroup'; public function initializeArguments(): void { parent::initializeArguments(); // @todo: deprecate $this->registerArgument('defaultController', 'string', 'Unused'); $this->registerArgument('label', 'string', 'The label of the option group', false, ''); } public function render(): string { $this->tag->addAttribute('label', $this->arguments['label']); $options = ''; foreach ($this->viewHelperNode->getChildNodes() as $childNode) { if ($childNode instanceof ViewHelperNode) { $options .= $childNode->evaluate($this->renderingContext); } } $this->tag->setContent($options); return $this->tag->render(); } }