function drush_field_get_entity_from_bundle

8.0.x field.drush.inc drush_field_get_entity_from_bundle($bundle)
6.x field.drush.inc drush_field_get_entity_from_bundle($bundle)
7.x field.drush.inc drush_field_get_entity_from_bundle($bundle)
4.x field.drush.inc drush_field_get_entity_from_bundle($bundle)
5.x field.drush.inc drush_field_get_entity_from_bundle($bundle)
1 call to drush_field_get_entity_from_bundle()

File

commands/core/field.drush.inc, line 372
Field API's drush integration

Code

function drush_field_get_entity_from_bundle($bundle) {
  if (drush_get_option('entity_type')) {
    return drush_get_option('entity_type');
  }
  else {
    $info = field_info_bundles();
    foreach ($info as $entity_type => $bundles) {
      if (isset($bundles[$bundle])) {
        return $entity_type;
      }
    }
  }
}