entity_uri

Versions
mediamosa-21
entity_uri($entity_type, $entity)

Returns the uri elements of an entity.

Parameters

$entity_type The entity type; e.g. 'node' or 'user'.

$entity The entity for which to generate a path.

Return value

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.

Code

includes/common.inc, line 6454

<?php
function entity_uri($entity_type, $entity) {
  $info = entity_get_info($entity_type);
  if (isset($info['uri callback']) && function_exists($info['uri callback'])) {
    return $info['uri callback']($entity) + array('options' => array());
  }
}
?>