function callback_entity_info_uri in Drupal 7
Return the URI for an entity.
Callback for hook_entity_info().
Parameters
$entity: The entity to return the URI for.
Return value
An associative array with the following elements:
- 'path': The URL path for the entity.
- 'options': (optional) An array of options for the url() function.
The actual entity URI can be constructed by passing these elements to url().
Related topics
File
- modules/
system/ system.api.php, line 4866 - Hooks provided by Drupal core and the System module.
Code
function callback_entity_info_uri($entity) {
return array(
'path' => 'node/' . $entity->nid,
);
}