[TASK] Move arguments to initializeArguments() in Nl2brVH in ext:fluid
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Classes / ViewHelpers / Format / Nl2brViewHelper.php
index 22725f2..a8391c2 100644 (file)
@@ -46,15 +46,27 @@ class Nl2brViewHelper extends AbstractViewHelper
      */
     protected $escapeOutput = false;
 
+    /**
+     * Initialize arguments.
+     *
+     * @api
+     * @throws \TYPO3Fluid\Fluid\Core\ViewHelper\Exception
+     */
+    public function initializeArguments()
+    {
+        parent::initializeArguments();
+        $this->registerArgument('value', 'string', 'string to format');
+    }
+
     /**
      * Replaces newline characters by HTML line breaks.
      *
-     * @param string $value string to format
      * @return string the altered string.
      * @api
      */
-    public function render($value = null)
+    public function render()
     {
+        $value = $this->arguments['value'];
         return static::renderStatic(
             array(
                 'value' => $value