You are here

function _workflow_rules_workflow_get_options in Workflow 7.2

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

Condition callback: gather all workflow states, to show in list_options.

3 string references to '_workflow_rules_workflow_get_options'
_workflowfield_rules_action_info in workflow_rules/workflow_rules.field.inc
Implements subfunction of hook_rules_action_info().
_workflownode_rules_action_info in workflow_rules/workflow_rules.node.inc
Implements subfunction of hook_rules_action_info().
_workflownode_rules_condition_info in workflow_rules/workflow_rules.node.inc
Implements subfunction of hook_rules_condition_info().

File

workflow_rules/workflow_rules.rules-callback.inc, line 31
Callback implementations for Rules integration for the Workflow module.

Code

function _workflow_rules_workflow_get_options($data) {

  // This is a poorman's effort to convert a token into a field name.
  $field_name = isset($data->settings['field:select']) ? _workflow_rules_token_replace($data->settings['field:select']) : '';
  $field = _workflow_info_field($field_name, NULL);
  $options['ANY'] = 'ANY state';
  $options += workflow_get_workflow_state_names($field['settings']['wid'], $grouped = TRUE);
  return $options;
}