Project

General

Profile

Actions

Feature #62242

closed

Add \TYPO3\CMS\Fluid\ViewHelpers\Be\Menus\ActionMenuItemGroupViewHelper

Added by Kay Strobach about 10 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
Start date:
2014-10-15
Due date:
% Done:

100%

Estimated time:
PHP Version:
5.5
Tags:
Complexity:
no-brainer
Sprint Focus:

Description

Using this ViewHelper we can use OptGroups in the Backend Selectfield which controls which function selected

<?php

namespace TYPO3\CMS\Fluid\ViewHelpers\Be\Menus;

class ActionMenuItemGroupViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\Menus\ActionMenuViewHelper {
    /**
     * @var string
     */
    protected $tagName = 'optgroup';

    /**
     * @param string $label
     * @return string
     */
    public function render($label = '') {
        $this->tag->addAttribute('label', $label);
        $options = '';
        foreach ($this->childNodes as $childNode) {
            if ($childNode instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode) {
                $options .= $childNode->evaluate($this->renderingContext);
            }
        }
        $this->tag->setContent($options);
        return $this->tag->render();
    }
}

Usage Example

<f:be.menus.actionMenu>
    <f:be.menus.actionMenuItem label="Default: Welcome" controller="Default" action="index" />
    <f:be.menus.actionMenuItem label="Community: get in touch" controller="Community" action="index" />

    <dev:be.menus.actionMenuItemGroup label="Information">
        <f:be.menus.actionMenuItem label="PHP Information" controller="Information" action="listPhpInfo" />
        <f:be.menus.actionMenuItem label="Documentation" controller="Information" action="documentation" />
        <f:be.menus.actionMenuItem label="Hooks" controller="Information" action="hooks" />
        <f:be.menus.actionMenuItem label="Signals" controller="Information" action="signals" />
        <f:be.menus.actionMenuItem label="XClasses" controller="Information" action="xclass" />
    </dev:be.menus.actionMenuItemGroup>
</f:be.menus.actionMenu>
Actions #1

Updated by Kay Strobach about 10 years ago

Please switch type of issue to FEATURE and not BUG

Actions #2

Updated by Georg Ringer about 10 years ago

  • Tracker changed from Bug to Feature
Actions #3

Updated by Philipp Gampe about 10 years ago

sounds good to me

Actions #4

Updated by Mathias Schreiber almost 10 years ago

  • Target version changed from 7.0 to 7.1 (Cleanup)
Actions #5

Updated by Gerrit Code Review over 9 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38487

Actions #6

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38487

Actions #7

Updated by Gerrit Code Review over 9 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38487

Actions #8

Updated by Gerrit Code Review over 9 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38487

Actions #9

Updated by Gerrit Code Review over 9 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38487

Actions #10

Updated by Gerrit Code Review over 9 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38487

Actions #11

Updated by Gerrit Code Review over 9 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38487

Actions #12

Updated by Gerrit Code Review over 9 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38487

Actions #13

Updated by Gerrit Code Review over 9 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38487

Actions #14

Updated by Michael Oehlhof over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #15

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF