You are here

function lingotek_get_bundles_by_profile in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lingotek.util.inc \lingotek_get_bundles_by_profile()
  2. 7.6 lingotek.util.inc \lingotek_get_bundles_by_profile()
1 call to lingotek_get_bundles_by_profile()
lingotek_get_disabled_bundles in ./lingotek.util.inc
Returns an array of disabled bundles for a given entity_type

File

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

Code

function lingotek_get_bundles_by_profile($entity_type, $profile) {
  $entities = variable_get('lingotek_entity_profiles');
  $profiled_bundles = array();
  if (isset($entities[$entity_type])) {
    foreach ($entities[$entity_type] as $bundle_name => $cur_profile) {
      if ((string) $profile === $cur_profile) {
        $profiled_bundles[] = $bundle_name;
      }
    }
  }
  return $profiled_bundles;
}