From 83c97345e8eada544d7da4586e2c77db469ed5b1 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Wed, 13 Jan 2010 06:26:49 +0000 Subject: #525622 by Frando, yched, et al: Add entity hook callbacks so that 'as link' formatters have a generic way to build the url of an 'entity'. --- modules/taxonomy/taxonomy.module | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/taxonomy/taxonomy.module') diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 1c9378613..bcfc1c0e9 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -87,6 +87,7 @@ function taxonomy_entity_info() { 'label' => t('Taxonomy term'), 'controller class' => 'TaxonomyTermController', 'base table' => 'taxonomy_term_data', + 'path callback' => 'taxonomy_term_path', 'fieldable' => TRUE, 'object keys' => array( 'id' => 'tid', @@ -128,6 +129,13 @@ function taxonomy_entity_info() { return $return; } +/** + * Entity path callback. + */ +function taxonomy_term_path($term) { + return 'taxonomy/term/' . $term->tid; +} + /** * Return nodes attached to a term across all field instances. * -- cgit v1.2.3