summaryrefslogtreecommitdiff
path: root/modules/field/field.info.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-10 05:58:13 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-07-10 05:58:13 +0000
commitf6ccf978f6fc256ca1f17bd8e6b1ae5be4fe8df2 (patch)
treeff1b9dcdb4d8c64fea7470194b5c36d0253f4260 /modules/field/field.info.inc
parente916edc798f891fdb08e2fae9684afc02e3de9d3 (diff)
downloadbrdo-f6ccf978f6fc256ca1f17bd8e6b1ae5be4fe8df2.tar.gz
brdo-f6ccf978f6fc256ca1f17bd8e6b1ae5be4fe8df2.tar.bz2
#488542 by yched: Allow field UI to be attached to any fieldable entity.
Diffstat (limited to 'modules/field/field.info.inc')
-rw-r--r--modules/field/field.info.inc12
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/field/field.info.inc b/modules/field/field.info.inc
index 3eb1d2e33..e9ac66c23 100644
--- a/modules/field/field.info.inc
+++ b/modules/field/field.info.inc
@@ -126,16 +126,18 @@ function _field_info_collate_types($reset = FALSE) {
foreach ($fieldable_types as $name => $fieldable_info) {
// Provide defaults.
$fieldable_info += array(
- 'revision key' => '',
- 'bundle key' => '',
'cacheable' => TRUE,
'bundles' => array(),
);
+ $fieldable_info['object keys'] += array(
+ 'revision' => '',
+ 'bundle' => '',
+ );
// If no bundle key provided, then we assume a single bundle, named
// after the type of the object. Make sure the bundle created
// has the human-readable name we need for bundle messages.
- if (empty($fieldable_info['bundle key'])) {
- $fieldable_info['bundles'] = array($name => $fieldable_info['name']);
+ if (empty($fieldable_info['object keys']['bundle']) && empty($fieldable_info['bundles'])) {
+ $fieldable_info['bundles'] = array($name => array('label' => $fieldable_info['label']));
}
$info['fieldable types'][$name] = $fieldable_info;
$info['fieldable types'][$name]['module'] = $module;
@@ -367,7 +369,7 @@ function field_info_bundles($obj_type = NULL) {
}
/**
- * Identity the type of entity that created a bundle.
+ * Identify the type of entity that created a bundle.
* // TODO : might not be needed depending on how we solve
* // the 'namespace bundle names' issue
*/