diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-07-10 05:58:13 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-07-10 05:58:13 +0000 |
commit | f6ccf978f6fc256ca1f17bd8e6b1ae5be4fe8df2 (patch) | |
tree | ff1b9dcdb4d8c64fea7470194b5c36d0253f4260 /modules/node/node.module | |
parent | e916edc798f891fdb08e2fae9684afc02e3de9d3 (diff) | |
download | brdo-f6ccf978f6fc256ca1f17bd8e6b1ae5be4fe8df2.tar.gz brdo-f6ccf978f6fc256ca1f17bd8e6b1ae5be4fe8df2.tar.bz2 |
#488542 by yched: Allow field UI to be attached to any fieldable entity.
Diffstat (limited to 'modules/node/node.module')
-rw-r--r-- | modules/node/node.module | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 4c3141b25..639d6f98c 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -124,17 +124,28 @@ function node_cron() { function node_fieldable_info() { $return = array( 'node' => array( - 'name' => t('Node'), - 'id key' => 'nid', - 'revision key' => 'vid', - 'bundle key' => 'type', + 'label' => t('Node'), + 'object keys' => array( + 'id' => 'nid', + 'revision' => 'vid', + 'bundle' => 'type', + ), // Node.module handles its own caching. // 'cacheable' => FALSE, - // Bundles must provide human readable name so - // we can create help and error messages about them. - 'bundles' => node_type_get_names(), + 'bundles' => array(), ), ); + // Bundles must provide a human readable name so we can create help and error + // messages, and the path to attach Field admin pages to. + foreach (node_type_get_names() as $type => $name) { + $return['node']['bundles'][$type] = array( + 'label' => $name, + 'admin' => array( + 'path' => 'admin/build/node-type/' . str_replace('_', '-', $type), + 'access arguments' => array('administer content types'), + ), + ); + } return $return; } |