You are here

public function StateFlow::get_label_for_current_state in State Machine 7.2

Get the label for the current state

Return value

string

File

modules/state_flow/plugins/state_flow.inc, line 140

Class

StateFlow

Code

public function get_label_for_current_state() {
  $state_key = $this
    ->get_current_state();
  $state = $this
    ->get_state($state_key);
  if ($label = $state
    ->get_option('label')) {
    return $label;
  }
  else {
    return drupal_ucfirst($state_key);
  }
}