diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2012-08-08 20:30:15 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2012-08-08 20:30:15 -0300 |
commit | 7e34cf50ad626eef4e1b9d734544c187aa37c94b (patch) | |
tree | 5a01e7c140790ae9a2d8845168b699567632ac2b | |
parent | 14d6e875bf0b732059358e3746b8051201ca8b95 (diff) | |
download | calendario-7e34cf50ad626eef4e1b9d734544c187aa37c94b.tar.gz calendario-7e34cf50ad626eef4e1b9d734544c187aa37c94b.tar.bz2 |
Implementing calendario_taxonomy_term_uri()
-rw-r--r-- | calendario.module | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/calendario.module b/calendario.module index 95038cf..aa33dfd 100644 --- a/calendario.module +++ b/calendario.module @@ -19,17 +19,9 @@ function calendario_theme($existing, $type, $theme, $path) { /** * 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'; } /** @@ -76,3 +68,12 @@ function calendario_views_post_render(&$view, &$output, &$cache) { $output .= calendario_widget($view); } } + +/** + * Entity uri callback. + */ +function calendario_taxonomy_term_uri($term) { + return array( + 'path' => 'taxonomy/term/' . $term->tid, + ); +} |