function callback_entity_info_uri

7.x system.api.php callback_entity_info_uri($entity)

Return the URI for an entity.

Callback for hook_entity_info().


$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


drupal/modules/system/system.api.php, line 4801
Hooks provided by Drupal core and the System module.


function callback_entity_info_uri($entity) {
  return array(
    'path' => 'node/' . $entity->nid,