‪TYPO3CMS  9.5
ActionMenuItemGroupViewHelper.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
17 use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ViewHelperNode;
18 
41 {
45  protected ‪$tagName = 'optgroup';
46 
52  public function ‪initializeArguments()
53  {
54  parent::initializeArguments();
55  $this->registerArgument('label', 'string', 'label', false, '');
56  }
57 
61  public function ‪render()
62  {
63  $label = $this->arguments['label'];
64 
65  $this->tag->addAttribute('label', $label);
66  $options = '';
67  foreach ($this->childNodes as $childNode) {
68  if ($childNode instanceof ViewHelperNode) {
69  $options .= $childNode->evaluate($this->renderingContext);
70  }
71  }
72  $this->tag->setContent($options);
73  return $this->tag->render();
74  }
75 }
‪TYPO3\CMS\Fluid\ViewHelpers\Be\Menus\ActionMenuItemGroupViewHelper\render
‪string render()
Definition: ActionMenuItemGroupViewHelper.php:60
‪TYPO3\CMS\Fluid\ViewHelpers\Be\Menus\ActionMenuItemGroupViewHelper\$tagName
‪string $tagName
Definition: ActionMenuItemGroupViewHelper.php:44
‪TYPO3\CMS\Fluid\ViewHelpers\Be\Menus\ActionMenuItemGroupViewHelper
Definition: ActionMenuItemGroupViewHelper.php:41
‪TYPO3\CMS\Fluid\ViewHelpers\Be\Menus\ActionMenuViewHelper
Definition: ActionMenuViewHelper.php:51
‪TYPO3\CMS\Fluid\ViewHelpers\Be\Menus
Definition: ActionMenuItemGroupViewHelper.php:2
‪TYPO3\CMS\Fluid\ViewHelpers\Be\Menus\ActionMenuItemGroupViewHelper\initializeArguments
‪initializeArguments()
Definition: ActionMenuItemGroupViewHelper.php:51