You are here

function fb_post_entity_load in Drupal for Facebook 7.4

File

./fb_post.module, line 118

Code

function fb_post_entity_load($entities, $type) {
  foreach ($entities as $id => $entity) {
    $entity->fb_post_graph = db_select('fb_post_graph')
      ->fields('fb_post_graph', array(
      'graph_id',
      'actor_id',
    ))
      ->condition('entity_type', $type)
      ->condition('entity_id', $id)
      ->execute()
      ->fetchAll();
  }
}