You are here

function _workflow_rules_workflow_check_given_state in Workflow 7

Same name and namespace in other branches
  1. 7.2 workflow_rules/workflow_rules.rules-callback.inc \_workflow_rules_workflow_check_given_state()

Condition implementation helper function: check given state.

Parameters

$sid: a State ID, to compare with the given list of allowed State ID's

array $sids: a list of allowed State ID's

Return value

bool TRUE or FALSE

3 calls to _workflow_rules_workflow_check_given_state()
_workflow_rules_workflow_check_previous_state in workflow_rules/workflow_rules.rules.inc
Condition implementation: check previous state.
_workflow_rules_workflow_check_state in workflow_rules/workflow_rules.rules.inc
Condition implementation: check current state.
_workflow_rules_workflow_check_transition in workflow_rules/workflow_rules.rules.inc
Condition implementation: check state transition.
1 string reference to '_workflow_rules_workflow_check_given_state'
_workflow_rules_rules_field_condition_info in workflow_rules/workflow_rules.field.inc
Implements subfunction of hook_rules_condition_info(). Using "node:" and "node:unchanged", there is no need to create more conditions to check transitions.

File

workflow_rules/workflow_rules.rules.inc, line 101
Rules integration for the Workflow module

Code

function _workflow_rules_workflow_check_given_state($sid, array $sids) {
  return in_array('ANY', $sids) || in_array($sid, $sids);
}