FluidTYPO3\Vhs\ViewHelpers\IfViewHelper::evaluateLogicalOperator PHP Method

evaluateLogicalOperator() protected static method

protected static evaluateLogicalOperator ( array $leftSide, string $operator, array $rightSide ) : boolean
$leftSide array
$operator string
$rightSide array
return boolean
    protected static function evaluateLogicalOperator(array $leftSide, $operator, array $rightSide)
    {
        $leftCondition = self::evaluateStack(self::prepareSideForEvaluation($leftSide));
        $rightCondition = self::evaluateStack(self::prepareSideForEvaluation($rightSide));
        if (self::OPERATOR_LOGICAL_AND === $operator) {
            return $leftCondition && $rightCondition;
        } elseif (self::OPERATOR_LOGICAL_OR === $operator) {
            return $leftCondition || $rightCondition;
        }
        throw new \RuntimeException('The stack could not be evaluated (internal error).', 1385072357);
    }