public function StateFlow::get_latest_revision in State Machine 7
Same name and namespace in other branches
- 6 modules/state_flow/plugins/state_flow.inc \StateFlow::get_latest_revision()
- 7.2 modules/state_flow/plugins/state_flow.inc \StateFlow::get_latest_revision()
3 calls to StateFlow::get_latest_revision()
- StateFlow::set_node_revision in modules/
state_flow/ plugins/ state_flow.inc - StateFlow::set_principle_revision in modules/
state_flow/ plugins/ state_flow.inc - StateFlow::set_unpublished in modules/
state_flow/ plugins/ state_flow.inc
File
- modules/
state_flow/ plugins/ state_flow.inc, line 268
Class
Code
public function get_latest_revision($nid) {
$result = db_query('SELECT MAX(vid) FROM {node_revision} WHERE nid = :nid', array(
':nid' => $nid,
))
->fetchCol('vid');
return !empty($result[0]) ? $result[0] : FALSE;
}