FluidTYPO3\Vhs\ViewHelpers\Format\PregReplaceViewHelper::renderStatic PHP Method

renderStatic() public static method

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)
    {
        if (empty($arguments['subject'])) {
            $subject = $renderChildrenClosure();
        } else {
            $subject = $arguments['subject'];
        }
        $value = preg_replace($arguments['pattern'], $arguments['replacement'], $subject);
        return static::renderChildrenWithVariableOrReturnInputStatic($value, $arguments['as'], $renderingContext, $renderChildrenClosure);
    }