You are here

function workflow_rules_check_state in Workflow 6.2

Same name and namespace in other branches
  1. 6 workflow_rules/workflow_rules.module \workflow_rules_check_state()

Condition implementation: check state.

File

workflow_rules/workflow_rules.module, line 84
Rules integration for the Workflow module

Code

function workflow_rules_check_state($node, $settings) {
  if (in_array('ANY', $settings['state'])) {
    return TRUE;
  }
  $state = workflow_node_current_state($node);
  return in_array($state, $settings['state']);
}