How to make method entity_uri work when $entity_type is taxonomy_vocabulary? I have a table with entities of type content, taxonomy_vocabulary and terms. For content and terms, I can show a link to each detail page by using the method entity_uri.

But for entities with type taxonomy_vocabulary this does not work, entity_uri returns null.

What is the best way to get the url for a taxonomy_vocabulary entity?
I hope it is not the best answer, because it requires customized code. But anyway, it is a possible solution and I'll share it.

/**
 * Implements hook_entity_info().
 */
function mymodule_entity_info_alter(&amp;$info) {
  if (isset($info['taxonomy_vocabulary'])) {
    $info['taxonomy_vocabulary']['uri callback'] = 'my_module_entity_info_uri_callback';
  }
}

/**
 * Return path for taxonomy_vocabulary entities
 */
function my_module_entity_info_uri_callback($taxonomy) {
  return array(
    'path' =&gt; 'admin/structure/taxonomy/' . $taxonomy-&gt;machine_name,
  );
}