public function Entity::uri in Entity API 7
Returns the uri of the entity just as entity_uri().
Modules may alter the uri by specifying another 'uri callback' using hook_entity_info_alter().
Overrides EntityInterface::uri
See also
File
- includes/
entity.inc, line 306 - Provides a base class for entities.
Class
- Entity
- A common class for entities.
Code
public function uri() {
if (isset($this->entityInfo['uri callback']) && $this->entityInfo['uri callback'] == 'entity_class_uri') {
return $this
->defaultUri();
}
return entity_uri($this->entityType, $this);
}