FluidTYPO3\Vhs\Traits\ConditionViewHelperTrait::renderStatic PHP Method

renderStatic() public static method

TODO: remove at some point, because this is only here for legacy reasons. the AbstractConditionViewHelper in 6.2.* doesn't have a default render method. 7.2+ on the other hand provides basically exactly this method here luckily it's backwards compatible out of the box. tl;dr -> remove after expiration of support for anything below 7.2
public static renderStatic ( array $arguments, Closure $renderChildrenClosure, TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext ) : mixed
$arguments array
$renderChildrenClosure Closure
$renderingContext TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface
return mixed
    public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
    {
        $hasEvaluated = true;
        if (static::evaluateCondition($arguments)) {
            $result = static::renderStaticThenChild($arguments, $hasEvaluated);
            if ($hasEvaluated) {
                return $result;
            }
            return $renderChildrenClosure();
        } else {
            $result = static::renderStaticElseChild($arguments, $hasEvaluated);
            if ($hasEvaluated) {
                return $result;
            }
        }
        return '';
    }