Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As entity_get_info() handles the missing bundles key for single bundles:
// If no bundle key is provided, assume a single bundle, named after
// the entity type.
if (empty($entity_info[$name]['entity keys']['bundle']) && empty($entity_info[$name]['bundles'])) {
$entity_info[$name]['bundles'] = array($name => array('label' => $entity_info[$name]['label']));
}
we should document this behaviour at the hook_entity_info() docs.
Comment | File | Size | Author |
---|---|---|---|
d7-patch-entity-docs.patch | 986 bytes | alippai | |
Comments
Comment #1
jhodgdonThanks! This looks like a good addition to the documentation. And only for 7.x. I'll get it committed shortly.
Comment #2
jhodgdonCommitted to 7.x. Thanks again!