src/Sulu/Bundle/AudienceTargetingBundle/TargetGroup/TargetGroupEvaluator.php
private function evaluateTargetGroupRule(TargetGroupRuleInterface $targetGroupRule)
    {
        foreach ($targetGroupRule->getConditions() as $targetGroupCondition) {
            $rule = $this->ruleCollection->getRule($targetGroupCondition->getType());

            if (!$rule->evaluate($targetGroupCondition->getCondition())) {
                return false;
            }
        }

        return true;
    }
private function evaluateTargetGroupRule(TargetGroupRuleInterface $targetGroupRule)
    {
        foreach ($targetGroupRule->getConditions() as $targetGroupCondition) {
            $rule = $this->ruleCollection->getRule($targetGroupCondition->getType());

            if (!$rule->evaluate($targetGroupCondition->getCondition())) {
                return false;
            }
        }

        return true;
    }
private function evaluateTargetGroupRule ( TargetGroupRuleInterface $ targetGroupRule ) { foreach ( $ targetGroupRule -> getConditions ( ) as $ targetGroupCondition ) { $ rule = $ this -> ruleCollection -> getRule ( $ targetGroupCondition -> getType ( ) ) ; if ( ! $ rule -> evaluate ( $ targetGroupCondition -> getCondition ( ) ) ) { return false ; } } return true ; }
Evaluates if the given rule is matching. Only returns true if all of the conditions are matching.

@param TargetGroupRuleInterface $targetGroupRule

@return bool
Evaluates if the given rule is matching . Only returns true if all of the conditions are matching .