summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-13 06:26:49 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-13 06:26:49 +0000
commit83c97345e8eada544d7da4586e2c77db469ed5b1 (patch)
treea1f3be8ca91873c1da221d108470bbac8dc1bb0d /modules/node/node.module
parentc78283e81bb60fd6c4574ad65d2b854dca524a98 (diff)
downloadbrdo-83c97345e8eada544d7da4586e2c77db469ed5b1.tar.gz
brdo-83c97345e8eada544d7da4586e2c77db469ed5b1.tar.bz2
#525622 by Frando, yched, et al: Add entity hook callbacks so that 'as link' formatters have a generic way to build the url of an 'entity'.
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 13fb334df..af855d7ca 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -185,6 +185,7 @@ function node_entity_info() {
'controller class' => 'NodeController',
'base table' => 'node',
'revision table' => 'node_revision',
+ 'path callback' => 'node_path',
'fieldable' => TRUE,
'object keys' => array(
'id' => 'nid',
@@ -242,6 +243,13 @@ function node_entity_info() {
}
/**
+ * Entity path callback.
+ */
+function node_path($node) {
+ return 'node/' . $node->nid;
+}
+
+/**
* Implements hook_admin_paths().
*/
function node_admin_paths() {