You are here

function _workflow_rules_workflow_check_given_state in Workflow 7.2

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

Condition implementation helper function: check given state.

Parameters

mixed $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_node_check_previous_state in workflow_rules/workflow_rules.rules-callback.inc
Condition implementation: check previous state.
_workflow_rules_node_check_state in workflow_rules/workflow_rules.rules-callback.inc
Condition implementation: check current state for Workflow Node API.
_workflow_rules_node_check_transition in workflow_rules/workflow_rules.rules-callback.inc
Condition implementation: check state transition..

File

workflow_rules/workflow_rules.rules-callback.inc, line 52
Callback implementations for 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);
}