You are here

public function StateFlowEntity::get_full_history in State Machine 7.3

Provide entire state_flow history.

@todo, this method should use dbtng and specify entity_type.

File

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

Class

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

Code

public function get_full_history() {
  $history = db_query('
    SELECT sfh.*, u.uid, u.name AS user_name
    FROM {state_flow_history} sfh
    LEFT JOIN {users} u ON u.uid = sfh.uid
    WHERE sfh.entity_id = :entity_id
    ORDER BY sfh.timestamp DESC', array(
    ':entity_id' => $this->object->entity_id,
  ))
    ->fetchAll();
  return $history;
}