Skip to content

Instantly share code, notes, and snippets.

@johnrobertwilson
Created September 8, 2011 18:04
Show Gist options
  • Save johnrobertwilson/1204124 to your computer and use it in GitHub Desktop.
Save johnrobertwilson/1204124 to your computer and use it in GitHub Desktop.
Getting all entities and bundles
foreach (entity_get_info() as $entity_type => $entity_info) {
foreach ($entity_info['bundles'] as $bundle => $bundle_info) {
$labels[$entity_type][$bundle] = !empty($bundle_info['label']) ? $bundle_info['label'] : FALSE;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment