You are here

function workbench_moderation_preprocess_state_flow_history_entity in Workbench Moderation 7.2

Prepare variables for the state_flow_history_entity template.

File

./workbench_moderation.module, line 434
workbench_moderation.module

Code

function workbench_moderation_preprocess_state_flow_history_entity(&$variables) {
  $states = workbench_workflows_options('states');

  // Rewrite state machine names into labels.
  if (!empty($variables['state']) && array_key_exists($variables['state'], $states)) {
    $variables['state'] = $states[$variables['state']];
  }
  if (!empty($variables['from_state']) && array_key_exists($variables['from_state'], $states)) {
    $variables['from_state'] = $states[$variables['from_state']];
  }
}