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