diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-13 06:26:49 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-13 06:26:49 +0000 |
commit | 83c97345e8eada544d7da4586e2c77db469ed5b1 (patch) | |
tree | a1f3be8ca91873c1da221d108470bbac8dc1bb0d /modules/system | |
parent | c78283e81bb60fd6c4574ad65d2b854dca524a98 (diff) | |
download | brdo-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/system')
-rw-r--r-- | modules/system/system.api.php | 3 |
1 files changed, 3 insertions, 0 deletions
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', |