You are here

function lingotek_list_entities_with_field_in_language in Lingotek Translation 7.4

Same name and namespace in other branches
  1. 7.7 lingotek.util.inc \lingotek_list_entities_with_field_in_language()
  2. 7.5 lingotek.util.inc \lingotek_list_entities_with_field_in_language()
  3. 7.6 lingotek.util.inc \lingotek_list_entities_with_field_in_language()
1 call to lingotek_list_entities_with_field_in_language()
lingotek_list_entities_with_language in ./lingotek.util.inc

File

./lingotek.util.inc, line 1374
Utility functions.

Code

function lingotek_list_entities_with_field_in_language($entity_type, $bundle, $field, $language) {
  $query = new EntityFieldQuery();
  $entities = $query
    ->entityCondition('entity_type', $entity_type)
    ->entityCondition('bundle', $bundle)
    ->entityCondition('deleted', 0)
    ->fieldLanguageCondition($field, $language)
    ->execute();
  return isset($entities['node']) ? array_keys($entities['node']) : array();
}