[TASK] Convert remaining ViewHelpers to static calling
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Classes / ViewHelpers / Format / CaseViewHelper.php
index 7fdecc9..d46f388 100644 (file)
@@ -19,6 +19,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
 use TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException;
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
+use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
 
 /**
  * Modifies the case of an input string to upper- or lowercase or capitalization.
@@ -66,6 +67,8 @@ use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
  */
 class CaseViewHelper extends AbstractViewHelper
 {
+    use CompileWithRenderStatic;
+
     /**
      * Directs the input string being converted to "lowercase"
      */
@@ -110,24 +113,6 @@ class CaseViewHelper extends AbstractViewHelper
     /**
      * Changes the case of the input string
      *
-     * @return string the altered string.
-     * @api
-     */
-    public function render()
-    {
-        return static::renderStatic(
-            [
-                'value' => $this->arguments['value'],
-                'mode' => $this->arguments['mode']
-            ],
-            $this->buildRenderChildrenClosure(),
-            $this->renderingContext
-        );
-    }
-
-    /**
-     * Changes the case of the input string
-     *
      * @param array $arguments
      * @param \Closure $renderChildrenClosure
      * @param RenderingContextInterface $renderingContext