/**
* Implements hook_entity_info_alter()
- *
- * @todo
- * Change 'uri callback' from taxonomy terms to point to calendars.
*/
function calendario_entity_info_alter(&$entity_info) {
- // Set the controller class for nodes to an alternate implementation of the
- // DrupalEntityController interface.
- /*
- *$entity_info['node']['controller class'] = 'MyCustomNodeController';
- */
- /* Your code here */
+ $entity_info['taxonomy_term']['uri callback'] = 'calendario_taxonomy_term_uri';
}
/**
$output .= calendario_widget($view);
}
}
+
+/**
+ * Entity uri callback.
+ */
+function calendario_taxonomy_term_uri($term) {
+ return array(
+ 'path' => 'taxonomy/term/' . $term->tid,
+ );
+}