function lingotek_get_enabled_entities_by_type in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.5 lingotek.util.inc \lingotek_get_enabled_entities_by_type()
- 7.6 lingotek.util.inc \lingotek_get_enabled_entities_by_type()
Get all entities enabled for Lingotek, by entity type
Parameters
string $entity_type: The entity type to search for entities
Return value
array an array of arrays containing entity type and entity ID
3 calls to lingotek_get_enabled_entities_by_type()
- LingotekSync::getEntitySourceCount in lib/
Drupal/ lingotek/ LingotekSync.php - lingotek_field_language_data_cleanup_batch_create in ./
lingotek.batch.inc - Field Language Data Cleanup Utility
- lingotek_previously_managed_translations in ./
lingotek.util.inc
File
- ./
lingotek.util.inc, line 2475 - Utility functions.
Code
function lingotek_get_enabled_entities_by_type($entity_type) {
$profiles = lingotek_get_profiles(FALSE);
$profile_ids = array_keys($profiles);
$entities = array();
foreach ($profile_ids as $id) {
$profile = LingotekProfile::loadById($id);
$entities += $profile
->getEntities($entity_type);
}
return $entities;
}