[FOLLOWUP][TASK] Move arguments to initializeArguments() in PaddingVH 99/49099/2
authorrehm <arthur.rehm@gmail.com>
Tue, 19 Jul 2016 13:34:14 +0000 (15:34 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 19 Jul 2016 17:24:46 +0000 (19:24 +0200)
This patch adds the parent::initializeArguments() call in own
implementation.

Resolves: #77061
Releases: master
Change-Id: Ibd075748f892000069f9f4bf118b274e7abdb73a
Reviewed-on: https://review.typo3.org/49099
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Jan Haffner <info@jan-haffner.de>
Tested-by: Jan Haffner <info@jan-haffner.de>
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Steven Cardoso <steven.cardoso@dkd.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/fluid/Classes/ViewHelpers/Format/PaddingViewHelper.php

index 36b8146..9158263 100644 (file)
@@ -43,8 +43,6 @@ use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
  * <output>
  * --TYPO3---
  * </output>
- *
- * @api
  */
 class PaddingViewHelper extends AbstractViewHelper
 {
@@ -58,11 +56,11 @@ class PaddingViewHelper extends AbstractViewHelper
     /**
      * Initialize arguments.
      *
-     * @api
      * @throws \TYPO3Fluid\Fluid\Core\ViewHelper\Exception
      */
     public function initializeArguments()
     {
+        parent::initializeArguments();
         $this->registerArgument('padLength', 'int', 'Length of the resulting string. If the value of pad_length is negative or less than the length of the input string, no padding takes place.', true);
         $this->registerArgument('padString', 'string', 'The padding string', false, ' ');
         $this->registerArgument('padType', 'string', 'Append the padding at this site (Possible values: right,left,both. Default: right)', false, 'right');
@@ -73,22 +71,11 @@ class PaddingViewHelper extends AbstractViewHelper
      * Pad a string to a certain length with another string
      *
      * @return string The formatted value
-     * @api
      */
     public function render()
     {
-        $padLength = $this->arguments['padLength'];
-        $padString = $this->arguments['padString'];
-        $padType = $this->arguments['padType'];
-        $value = $this->arguments['value'];
-
         return static::renderStatic(
-            array(
-                'padLength' => $padLength,
-                'padString' => $padString,
-                'padType' => $padType,
-                'value' => $value
-            ),
+            $this->arguments,
             $this->buildRenderChildrenClosure(),
             $this->renderingContext
         );