Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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!