[FOLLOWUP][TASK] Move arguments to initializeArguments() in NumberVH in ext:fluid 02/49102/2
authorJan Haffner <info@jan-haffner.de>
Tue, 19 Jul 2016 13:50:17 +0000 (15:50 +0200)
committerNicole Cordes <typo3@cordes.co>
Tue, 19 Jul 2016 14:36:00 +0000 (16:36 +0200)
This patch adds the parent::initializeArguments() call in own implementation.

Resolves: #77047
Releases: master
Change-Id: I42f9bef51071667ec239ea6ca286453694c8976c
Reviewed-on: https://review.typo3.org/49102
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Steven Cardoso <steven.cardoso@dkd.de>
Reviewed-by: Arthur Rehm <arthur.rehm@gmail.com>
Tested-by: Arthur Rehm <arthur.rehm@gmail.com>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/fluid/Classes/ViewHelpers/Format/NumberViewHelper.php

index e510425..121023d 100644 (file)
@@ -37,8 +37,6 @@ use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
  * <output>
  * 423.423,2
  * </output>
  * <output>
  * 423.423,2
  * </output>
- *
- * @api
  */
 class NumberViewHelper extends AbstractViewHelper
 {
  */
 class NumberViewHelper extends AbstractViewHelper
 {
@@ -52,11 +50,11 @@ class NumberViewHelper extends AbstractViewHelper
     /**
      * Initialize arguments.
      *
     /**
      * Initialize arguments.
      *
-     * @api
      * @throws \TYPO3Fluid\Fluid\Core\ViewHelper\Exception
      */
     public function initializeArguments()
     {
      * @throws \TYPO3Fluid\Fluid\Core\ViewHelper\Exception
      */
     public function initializeArguments()
     {
+        parent::initializeArguments();
         $this->registerArgument('decimals', 'int', 'The number of digits after the decimal point', false, '2');
         $this->registerArgument('decimalSeparator', 'string', 'The decimal point character', false, '.');
         $this->registerArgument('thousandsSeparator', 'string', 'The character for grouping the thousand digits', false, ',');
         $this->registerArgument('decimals', 'int', 'The number of digits after the decimal point', false, '2');
         $this->registerArgument('decimalSeparator', 'string', 'The decimal point character', false, '.');
         $this->registerArgument('thousandsSeparator', 'string', 'The character for grouping the thousand digits', false, ',');
@@ -67,20 +65,11 @@ class NumberViewHelper extends AbstractViewHelper
      * precision.
      *
      * @return string The formatted number
      * precision.
      *
      * @return string The formatted number
-     * @api
      */
     public function render()
     {
      */
     public function render()
     {
-        $decimals = $this->arguments['decimals'];
-        $decimalSeparator = $this->arguments['decimalSeparator'];
-        $thousandsSeparator = $this->arguments['thousandsSeparator'];
-
         return static::renderStatic(
         return static::renderStatic(
-            array(
-                'decimals' => $decimals,
-                'decimalSeparator' => $decimalSeparator,
-                'thousandsSeparator' => $thousandsSeparator,
-            ),
+            $this->arguments,
             $this->buildRenderChildrenClosure(),
             $this->renderingContext
         );
             $this->buildRenderChildrenClosure(),
             $this->renderingContext
         );