You are here

public function StateFlow::revision_state in State Machine 7.2

Same name and namespace in other branches
  1. 7 modules/state_flow/plugins/state_flow.inc \StateFlow::revision_state()
1 call to StateFlow::revision_state()
StateFlow::load in modules/state_flow/plugins/state_flow.inc
Load the current state from the given state storage

File

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

Class

StateFlow

Code

public function revision_state($vid) {
  $latest_state = db_query_range('
	  SELECT state
      FROM {node_revision_states}
      WHERE vid = :vid', 0, 1, array(
    ':vid' => $vid,
  ))
    ->fetchCol('state');
  return !empty($latest_state[0]) ? $latest_state[0] : FALSE;
}