[CLEANUP] Rework/simplify copyright header and remove @package
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Classes / ViewHelpers / Be / Menus / ActionMenuViewHelper.php
index 60056f2..71f30ce 100644 (file)
@@ -1,23 +1,20 @@
 <?php
-/*                                                                        *
- * This script belongs to the FLOW3 package "Fluid".                      *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License as published by the *
- * Free Software Foundation, either version 3 of the License, or (at your *
- * option) any later version.                                             *
- *                                                                        *
- * This script is distributed in the hope that it will be useful, but     *
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
- * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
- * General Public License for more details.                               *
- *                                                                        *
- * You should have received a copy of the GNU Lesser General Public       *
- * License along with the script.                                         *
- * If not, see http://www.gnu.org/licenses/lgpl.html                      *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
+namespace TYPO3\CMS\Fluid\ViewHelpers\Be\Menus;
+
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is backported from the TYPO3 Flow package "TYPO3.Fluid".
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
 
 /**
  * View helper which returns a select box, that can be used to switch between
  *
  * <code title="Simple">
  * <f:be.menus.actionMenu>
- *   <f:be.menus.actionMenuItem label="Overview" controller="Blog" action="index" />
- *   <f:be.menus.actionMenuItem label="Create new Blog" controller="Blog" action="new" />
- *   <f:be.menus.actionMenuItem label="List Posts" controller="Post" action="index" arguments="{blog: blog}" />
+ * <f:be.menus.actionMenuItem label="Overview" controller="Blog" action="index" />
+ * <f:be.menus.actionMenuItem label="Create new Blog" controller="Blog" action="new" />
+ * <f:be.menus.actionMenuItem label="List Posts" controller="Post" action="index" arguments="{blog: blog}" />
  * </f:be.menus.actionMenu>
  * </code>
- *
- * Output:
+ * <output>
  * Selectbox with the options "Overview", "Create new Blog" and "List Posts"
+ * </output>
  *
  * <code title="Localized">
  * <f:be.menus.actionMenu>
- *   <f:be.menus.actionMenuItem label="{f:translate(key='overview')}" controller="Blog" action="index" />
- *   <f:be.menus.actionMenuItem label="{f:translate(key='create_blog')}" controller="Blog" action="new" />
+ * <f:be.menus.actionMenuItem label="{f:translate(key:'overview')}" controller="Blog" action="index" />
+ * <f:be.menus.actionMenuItem label="{f:translate(key:'create_blog')}" controller="Blog" action="new" />
  * </f:be.menus.actionMenu>
  * </code>
- *
- * @author      Steffen Kamper <info@sk-typo3.de>
- * @author      Bastian Waidelich <bastian@typo3.org>
- * @license     http://www.gnu.org/copyleft/gpl.html
- * @version     SVN: $Id:
- *
+ * <output>
+ * localized selectbox
+ * <output>
  */
-class Tx_Fluid_ViewHelpers_Be_Menus_ActionMenuViewHelper extends Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper implements Tx_Fluid_Core_ViewHelper_Facets_ChildNodeAccessInterface {
+class ActionMenuViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper implements \TYPO3\CMS\Fluid\Core\ViewHelper\Facets\ChildNodeAccessInterface {
 
        /**
         * @var string
@@ -59,6 +53,7 @@ class Tx_Fluid_ViewHelpers_Be_Menus_ActionMenuViewHelper extends Tx_Fluid_Core_V
 
        /**
         * An array of Tx_Fluid_Core_Parser_SyntaxTree_AbstractNode
+        *
         * @var array
         */
        protected $childNodes = array();
@@ -68,7 +63,6 @@ class Tx_Fluid_ViewHelpers_Be_Menus_ActionMenuViewHelper extends Tx_Fluid_Core_V
         *
         * @param array $childNodes Child nodes of this syntax tree node
         * @return void
-        * @author Sebastian Kurf├╝rst <sebastian@typo3.org>
         * @api
         */
        public function setChildNodes(array $childNodes) {
@@ -85,12 +79,11 @@ class Tx_Fluid_ViewHelpers_Be_Menus_ActionMenuViewHelper extends Tx_Fluid_Core_V
                $this->tag->addAttribute('onchange', 'jumpToUrl(this.options[this.selectedIndex].value, this);');
                $options = '';
                foreach ($this->childNodes as $childNode) {
-                       if ($childNode instanceof Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode) {
-                               $options .= $childNode->evaluate($this->getRenderingContext());
+                       if ($childNode instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode) {
+                               $options .= $childNode->evaluate($this->renderingContext);
                        }
                }
                $this->tag->setContent($options);
                return '<div class="docheader-funcmenu">' . $this->tag->render() . '</div>';
        }
 }
-?>
\ No newline at end of file