summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-13 06:26:49 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-13 06:26:49 +0000
commit83c97345e8eada544d7da4586e2c77db469ed5b1 (patch)
treea1f3be8ca91873c1da221d108470bbac8dc1bb0d /modules/taxonomy/taxonomy.module
parentc78283e81bb60fd6c4574ad65d2b854dca524a98 (diff)
downloadbrdo-83c97345e8eada544d7da4586e2c77db469ed5b1.tar.gz
brdo-83c97345e8eada544d7da4586e2c77db469ed5b1.tar.bz2
#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'.
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r--modules/taxonomy/taxonomy.module8
1 files changed, 8 insertions, 0 deletions
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',
@@ -129,6 +130,13 @@ function taxonomy_entity_info() {
}
/**
+ * Entity path callback.
+ */
+function taxonomy_term_path($term) {
+ return 'taxonomy/term/' . $term->tid;
+}
+
+/**
* Return nodes attached to a term across all field instances.
*
* This function requires taxonomy module to be maintaining its own tables,