function uuid_link_entity_url in UUID Link 6
Same name and namespace in other branches
- 7 uuid_link.module \uuid_link_entity_url()
Get URL to an entity.
Parameters
$entity_type: Entity type.
$entity: Entity object.
File
- ./
uuid_link.module, line 111 - Provides a filter and UI for adding links to entities that are not affected by changes in URL alias.
Code
function uuid_link_entity_url($entity_type, $entity) {
switch ($entity_type) {
default:
$uri = entity_uri($entity_type, $entity);
if (is_array($uri)) {
return _uuid_link_entity_url($uri, $entity);
}
case 'file':
return file_create_url($entity->uri);
}
}