FluidTYPO3\Vhs\Traits\ConditionViewHelperTrait::renderStaticThenChild PHP Метод

renderStaticThenChild() защищенный статический Метод

The "$hasEvaluated" argument is there to distinguish the case that "then" returned NULL or was not evaluated. 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
protected static renderStaticThenChild ( array $arguments, boolean &$hasEvaluated ) : string
$arguments array ViewHelper arguments
$hasEvaluated boolean Can be used to check if the "then" child was actually evaluated by this method.
Результат string
    protected static function renderStaticThenChild($arguments, &$hasEvaluated)
    {
        if (isset($arguments['then'])) {
            return $arguments['then'];
        }
        if (isset($arguments['__thenClosure'])) {
            $thenClosure = $arguments['__thenClosure'];
            return $thenClosure();
        } elseif (isset($arguments['__elseClosure'])) {
            return '';
        }
        $hasEvaluated = false;
    }