You are here

public function StateFlow::load in State Machine 7.2

Same name and namespace in other branches
  1. 6 modules/state_flow/plugins/state_flow.inc \StateFlow::load()
  2. 7 modules/state_flow/plugins/state_flow.inc \StateFlow::load()

Load the current state from the given state storage

Overrides StateMachine::load

File

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

Class

StateFlow

Code

public function load() {
  $state = FALSE;
  if (!empty($this->object->vid)) {
    $state = $this
      ->revision_state($this->object->vid);
  }
  elseif (!empty($this->object->nid)) {
    $state = $this
      ->latest_state($this->object->nid);
  }
  return $state;
}