protected function checkRules($context = null)
    {
        $rules = $this->getRules();
        $result = false;

        foreach ($rules as $rule) {
            if ($rule->check($context)) {
                $result = true;
                break;
            }
        }

        return $result;
    }
protected function checkRules($context = null)
    {
        $rules = $this->getRules();
        $result = false;

        foreach ($rules as $rule) {
            if ($rule->check($context)) {
                $result = true;
                break;
            }
        }

        return $result;
    }
protected function checkRules ( $ context = null ) { $ rules = $ this -> getRules ( ) ; $ result = false ; foreach ( $ rules as $ rule ) { if ( $ rule -> check ( $ context ) ) { $ result = true ; break ; } } return $ result ; }
Check rules whether action must be performed.
If at least one rule returns true the action will be performed.
If result is `true` then action must be performed.
@param null $context
@return bool
Check rules whether action must be performed . If at least one rule returns true the action will be performed . If result is true then action must be performed .