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/system/system.api.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/system/system.api.php') diff --git a/modules/system/system.api.php b/modules/system/system.api.php index f8f20b8cc..f92da9012 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -66,6 +66,8 @@ function hook_hook_info() { * static caching of entities during a page request. Defaults to TRUE. * - load hook: The name of the hook which should be invoked by * DrupalDefaultEntityController:attachLoad(), for example 'node_load'. + * - path callback: A function taking an entity as argument and returning the + * path to the entity. * - fieldable: Set to TRUE if you want your entity type to be fieldable. * - object keys: An array describing how the Field API can extract the * information it needs from the objects of the type. Elements: @@ -126,6 +128,7 @@ function hook_entity_info() { 'controller class' => 'NodeController', 'base table' => 'node', 'revision table' => 'node_revision', + 'path callback' => 'node_path', 'fieldable' => TRUE, 'object keys' => array( 'id' => 'nid', -- cgit v1.2.3