public function StateFlow::revision_state in State Machine 7.2
Same name and namespace in other branches
- 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
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;
}