You are here

function workflow_get_sid_label in Workflow 7.2

Helper function, to get the label of a given state.

6 calls to workflow_get_sid_label()
views_handler_argument_workflow_state::summary_name in workflow_views/handlers/workflow_views_handler_argument_state.inc
Overrides the behavior of summary_name().
views_handler_argument_workflow_state::title in workflow_views/handlers/workflow_views_handler_argument_state.inc
Overrides the behavior of title(). Get the user-friendly version of the workflow state.
workflow_search_api_property_workflow_state_getter_callback in workflow_search_api/workflow_search_api.module
Getter callback for workflow state defined in workflow_search_api_entity_property_info_alter.
workflow_state_formatter in ./workflow.module
Creates a form element to show the current value of a Workflow state.
workflow_vbo_given_state_action in workflow_vbo/actions/given.action.inc
Implements a Drupal action. Move a node to a specified state in the workflow.

... See full list

File

./workflow.module, line 656
Support workflows made up of arbitrary states.

Code

function workflow_get_sid_label($sid) {
  if (empty($sid)) {
    $label = 'No state';
  }
  elseif ($state = workflow_state_load_single($sid)) {
    $label = $state
      ->label();
  }
  else {
    $label = 'Unknown state';
  }
  return $label;
}