[TASK] Convert remaining ViewHelpers to static calling
[Packages/TYPO3.CMS.git] / typo3 / sysext / indexed_search / Classes / ViewHelpers / Format / DateTimeViewHelper.php
index 7e5f3df..cf3a66b 100644 (file)
@@ -17,12 +17,15 @@ namespace TYPO3\CMS\IndexedSearch\ViewHelpers\Format;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
+use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
 
 /**
  * DateTime viewhelper
  */
 class DateTimeViewHelper extends AbstractViewHelper
 {
+    use CompileWithRenderStatic;
+
     /**
      * The rendered children are fed into data() function, which expects an integer.
      * It reduces overhead and is safe to disable children escaping here.
@@ -34,18 +37,6 @@ class DateTimeViewHelper extends AbstractViewHelper
     /**
      * Render the given timestamp as date & time
      *
-     * @return string
-     */
-    public function render()
-    {
-        return static::renderStatic(
-            [],
-            $this->buildRenderChildrenClosure(),
-            $this->renderingContext
-        );
-    }
-
-    /**
      * @param array $arguments
      * @param \Closure $renderChildrenClosure
      * @param RenderingContextInterface $renderingContext