You are here

function revisioning_revision_states in Revisioning 6.3

Same name and namespace in other branches
  1. 8 revisioning_api.inc \revisioning_revision_states()
  2. 7 revisioning_api.inc \revisioning_revision_states()

Return a single or all possible revision state names.

Parameters

$state: optional state id, as defined in revisioning_api.inc

Return value

if $state is provided, state name. Otherwise, state names array keyed by state id.

5 calls to revisioning_revision_states()
revisioning_condition_revision_is_form in ./revisioning.rules.inc
revisioning_condition_revision_is_label in ./revisioning.rules.inc
Label callback for "revisioning_revision_is" condition.
revisioning_handler_field_revision_state::render in views/revisioning_handler_field_revision_state.inc
Note that $values contains: o node_revisions_nid (parent node id) o node_revisions_vid (revision id) o node_status (published flag) o node_vid (current revision id)
revisioning_handler_filter_node_state::get_value_options in views/revisioning_handler_filter_node_state.inc
revisioning_handler_filter_revision_state::get_value_options in views/revisioning_handler_filter_revision_state.inc

File

./revisioning_api.inc, line 39
API functions of Revisioning module

Code

function revisioning_revision_states($state = NULL) {
  static $states;
  $states = array(
    REVISION_ARCHIVED => t('Archived'),
    REVISION_CURRENT => t('Current, published'),
    REVISION_PENDING => t('Pending'),
  );
  return $state === NULL ? $states : $states[$state];
}