You are here

public function StateFlowEntity::get_label_for_current_state in State Machine 7.3

Get the label for the current state.

Return value

string Label for the current state.

File

modules/state_flow_entity/plugins/state_flow_entity.inc, line 188
State Flow implementation of the State Machine class.

Class

StateFlowEntity
@file State Flow implementation of the State Machine class.

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);
  }
}