You are here

function _radioactivity_get_history_for_field_and_entity in Radioactivity 7.2

Get history data for the given field

2 calls to _radioactivity_get_history_for_field_and_entity()
radioactivity_field_formatter_view in ./radioactivity.field.inc
Implements hook_field_formatter_view()
radioactivity_field_widget_form in ./radioactivity.field.inc
Implement hook_field_widget().

File

./radioactivity.module, line 374
Radioactivity core functionality

Code

function _radioactivity_get_history_for_field_and_entity($field_id, $entity_id) {
  return db_select('radioactivity_history', 'rh')
    ->fields('rh', array(
    'time',
    'energy',
  ))
    ->orderBy('rh.time', 'ASC')
    ->condition('rh.field_instance_id', $field_id)
    ->condition('rh.entity_id', $entity_id)
    ->execute()
    ->fetchAllKeyed();
}