You are here

class views_handler_argument_workflow_state in Workflow 6.2

Same name and namespace in other branches
  1. 6 workflow_views/includes/workflow_views_handler_argument_state.inc \views_handler_argument_workflow_state
  2. 7.2 workflow_views/handlers/workflow_views_handler_argument_state.inc \views_handler_argument_workflow_state
  3. 7 workflow_views/includes/workflow_views_handler_argument_state.inc \views_handler_argument_workflow_state

Argument handler to accept a node type.

Hierarchy

Expanded class hierarchy of views_handler_argument_workflow_state

File

workflow_views/includes/workflow_views_handler_argument_state.inc, line 11
Provide views argument handler for workflow.module.

View source
class views_handler_argument_workflow_state extends views_handler_argument {
  function construct() {
    parent::construct('type');
  }

  /**
   * Override the behavior of summary_name(). Get the user-friendly version
   * of the workflow state.
   */
  function summary_name($data) {
    return $this
      ->workflow_states($data->{$this->name_alias});
  }

  /**
   * Override the behavior of title(). Get the user-friendly version of the
   * workflow state.
   */
  function title() {
    return $this
      ->workflow_states($this->argument);
  }
  function workflow_states($sid) {
    if (empty($sid)) {
      return t('No state');
    }
    static $states;
    if (!isset($states)) {
      $states = workflow_get_states();
    }
    $output = $states[$sid];
    if (empty($output)) {
      $output = t('No state');
    }
    return check_plain($output);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
views_handler_argument_workflow_state::construct function
views_handler_argument_workflow_state::summary_name function Override the behavior of summary_name(). Get the user-friendly version of the workflow state.
views_handler_argument_workflow_state::title function Override the behavior of title(). Get the user-friendly version of the workflow state.
views_handler_argument_workflow_state::workflow_states function