You are here

function sf_entity_entity_load in Salesforce Suite 7

Same name and namespace in other branches
  1. 7.2 sf_entity/sf_entity.module \sf_entity_entity_load()

Implements hook_entity_load().

File

sf_entity/sf_entity.module, line 110
Integrates fieldable entities with the Salesforce API.

Code

function sf_entity_entity_load(&$entities, $type) {
  $ids = array_keys($entities);
  $results = salesforce_api_id_load($type, $bundle = NULL, $ids, 'oid');
  foreach ($results as $oid => $result) {
    if (empty($entities[$oid])) {
      continue;
    }
    $entities[$oid]->salesforce = $result;
  }
}