You are here

function lingotek_admin_profile_usage in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lingotek.admin.inc \lingotek_admin_profile_usage()
  2. 7.4 lingotek.admin.inc \lingotek_admin_profile_usage()
  3. 7.5 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 622

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;
}