function lingotek_admin_profile_usage in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.7 lingotek.admin.inc \lingotek_admin_profile_usage()
- 7.4 lingotek.admin.inc \lingotek_admin_profile_usage()
- 7.6 lingotek.admin.inc \lingotek_admin_profile_usage()
2 calls to lingotek_admin_profile_usage()
- lingotek_admin_profiles_form in ./
lingotek.admin.inc - lingotek_admin_profile_form in ./
lingotek.admin.inc - Content defaults Form
File
- ./
lingotek.admin.inc, line 495
Code
function lingotek_admin_profile_usage($profile_id) {
$entity_counts = array();
$entities = lingotek_get_all_entities_by_profile($profile_id);
// count up the entities by type
foreach ($entities as $e) {
if (isset($entity_counts[$e['type']])) {
$entity_counts[$e['type']]++;
}
else {
$entity_counts[$e['type']] = 1;
}
}
return $entity_counts;
}