Created
September 8, 2011 18:04
-
-
Save johnrobertwilson/1204124 to your computer and use it in GitHub Desktop.
Getting all entities and bundles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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