diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-02-11 15:52:13 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-02-11 15:52:13 +0000 |
commit | 52195a6b1dd478875a93935df27d7bcacb14f289 (patch) | |
tree | 052233b34e4c6a9a0d6268426e650500817265f6 /includes/common.inc | |
parent | 30ae1fb5596cc59e27717262a04e6447d27cebb4 (diff) | |
download | brdo-52195a6b1dd478875a93935df27d7bcacb14f289.tar.gz brdo-52195a6b1dd478875a93935df27d7bcacb14f289.tar.bz2 |
#525622 by scor, catch, and yched: Allow Entity path callback to deal with options.
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/includes/common.inc b/includes/common.inc index 5285e7311..cea7b037b 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -6567,19 +6567,21 @@ function entity_prepare_view($entity_type, $entities) { } /** - * Returns the path to an entity. + * Returns the uri elements of an entity. * * @param $entity_type * The entity type; e.g. 'node' or 'user'. * @param $entity * The entity for which to generate a path. * @return - * The path for the entity, or NULL if the entity has no page of its own. + * An array containing the 'path' and 'options' keys used to build the uri of + * the entity, and matching the signature of url(). NULL if the entity has no + * uri of its own. */ -function entity_path($entity_type, $entity) { +function entity_uri($entity_type, $entity) { $info = entity_get_info($entity_type); - if (isset($info['path callback']) && function_exists($info['path callback'])) { - return $info['path callback']($entity); + if (isset($info['uri callback']) && function_exists($info['uri callback'])) { + return $info['uri callback']($entity) + array('options' => array()); } } /** |