You are here

function webform_workflow_get_available_states in Webform Workflow 7

Get all states attached to a webform.

Parameters

object $node: The webform node.

Return value

array An array of states.

4 calls to webform_workflow_get_available_states()
webform_workflow_change_submission_state_form in ./webform_workflow.module
Action configuration form for changing the workflow state of a submission.
webform_workflow_state_get_default in ./webform_workflow.module
Get the default (first) workflow state for a node.
webform_workflow_submission_state_form in includes/webform_workflow.forms.inc
Form for changing the state of an existing submission.
webform_workflow_views_handler_filter_state::get_value_options in includes/views/handlers/webform_workflow_views_handler_filter_state.inc
Overrides parent::get_value_options().

File

./webform_workflow.module, line 685
A simple workflow module for webforms.

Code

function webform_workflow_get_available_states($node) {
  if (empty($node->webform_workflow_states)) {
    return array();
  }
  return entity_metadata_wrapper('node', $node)->webform_workflow_states
    ->value();
}