You are here

function lingotek_entity_load_single in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lingotek.module \lingotek_entity_load_single()
  2. 7.4 lingotek.module \lingotek_entity_load_single()
  3. 7.6 lingotek.module \lingotek_entity_load_single()
17 calls to lingotek_entity_load_single()
lingotek_cleanup_message_types in ./lingotek.util.inc
Set all message types with empty or undefined languages to be the site's default language
lingotek_cleanup_notify_entity_translation in ./lingotek.util.inc
Report all Lingotek translations to the Entity Translation module
lingotek_entity_download in ./lingotek.module
lingotek_entity_download_triggered in ./lingotek.module
lingotek_entity_upload in ./lingotek.module

... See full list

File

./lingotek.module, line 1300

Code

function lingotek_entity_load_single($entity_type, $entity_id) {
  $entity = NULL;
  if ($entity_type == 'node') {
    $entity = lingotek_node_load_default($entity_id);
  }
  else {
    $entities = entity_load($entity_type, array(
      $entity_id,
    ));
    if ($entities && isset($entities[$entity_id])) {
      $entity = $entities[$entity_id];
    }
  }
  return $entity;
}