コード例 #1
0
 /**
  * Checks if a validator is active for the workflow event passed as argument.
  *
  * @param Validator $validator The validator instance to test
  * @param $currentScenario
  * @return bool
  */
 private function _isActiveValidator($validator, $currentScenario)
 {
     foreach ($validator->on as $scenario) {
         if (WorkflowScenario::match($scenario, $currentScenario)) {
             return true;
         }
     }
     return false;
 }