From 83c97345e8eada544d7da4586e2c77db469ed5b1 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Wed, 13 Jan 2010 06:26:49 +0000 Subject: #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'. --- modules/node/node.module | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/node/node.module') 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', @@ -241,6 +242,13 @@ function node_entity_info() { return $return; } +/** + * Entity path callback. + */ +function node_path($node) { + return 'node/' . $node->nid; +} + /** * Implements hook_admin_paths(). */ -- cgit v1.2.3