function callback_entity_info_uri

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 system.api.php callback_entity_info_uri($entity)
cle7 system.api.php callback_entity_info_uri($entity)
elmsmedia7 system.api.php callback_entity_info_uri($entity)
icor7 system.api.php callback_entity_info_uri($entity)
meedjum_blog7 system.api.php callback_entity_info_uri($entity)
mooc7 system.api.php callback_entity_info_uri($entity)

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 4739
Hooks provided by Drupal core and the System module.

Code

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