summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy.views.inc
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy.views.inc')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy.views.inc55
1 files changed, 42 insertions, 13 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy.views.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy.views.inc
index 7dd225b..58d62d1 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy.views.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/taxonomy.views.inc
@@ -1,18 +1,14 @@
<?php
-/**
- * @file
- *
- * Provide views data and handlers for taxonomy.module
- */
/**
- * @defgroup views_taxonomy_module taxonomy.module handlers
+ * @file
+ * Provide views data and handlers for taxonomy.module.
*
- * @{
+ * @ingroup views_module_handlers
*/
/**
- * Implements hook_views_data()
+ * Implements hook_views_data().
*/
function taxonomy_views_data() {
$data = array();
@@ -90,6 +86,24 @@ function taxonomy_views_data() {
'handler' => 'views_handler_field',
),
);
+ $data['taxonomy_vocabulary']['weight'] = array(
+ 'title' => t('Weight'),
+ 'help' => t('The taxonomy vocabulary weight'),
+ 'field' => array(
+ 'handler' => 'views_handler_field_numeric',
+ 'click sortable' => TRUE,
+ ),
+ 'argument' => array(
+ 'handler' => 'views_handler_argument_numeric',
+ 'name field' => 'weight',
+ ),
+ 'sort' => array(
+ 'handler' => 'views_handler_sort',
+ ),
+ 'filter' => array(
+ 'handler' => 'views_handler_filter_numeric',
+ ),
+ );
// ----------------------------------------------------------------------
// taxonomy_term_data table
@@ -152,6 +166,17 @@ function taxonomy_views_data() {
),
);
+ // raw tid field
+ $data['taxonomy_term_data']['tid_raw'] = array(
+ 'title' => t('Term ID'),
+ 'help' => t('The tid of a taxonomy term.'),
+ 'real field' => 'tid',
+ 'filter' => array(
+ 'handler' => 'views_handler_filter_numeric',
+ 'allow empty' => TRUE,
+ ),
+ );
+
$data['taxonomy_term_data']['tid_representative'] = array(
'relationship' => array(
'title' => t('Representative node'),
@@ -204,6 +229,9 @@ function taxonomy_views_data() {
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
+ 'argument' => array(
+ 'handler' => 'views_handler_argument_numeric',
+ ),
);
// Term description
@@ -332,6 +360,10 @@ function taxonomy_views_data() {
'field' => 'parent',
'label' => t('Parent'),
),
+ 'filter' => array(
+ 'help' => t('Filter the results of "Taxonomy: Term" by the parent pid.'),
+ 'handler' => 'views_handler_filter_numeric',
+ ),
'argument' => array(
'help' => t('The parent term of the term.'),
'handler' => 'views_handler_argument_taxonomy',
@@ -457,7 +489,7 @@ function taxonomy_field_views_data_views_data_alter(&$data, $field) {
}
/**
- * Implements hook_views_plugins
+ * Implements hook_views_plugins().
*/
function taxonomy_views_plugins() {
return array(
@@ -497,6 +529,7 @@ function views_taxonomy_set_breadcrumb(&$breadcrumb, &$argument) {
}
if (!empty($argument->options['use_taxonomy_term_path'])) {
$path = taxonomy_term_uri($parent);
+ $path = $path['path'];
}
else {
$args[$argument->position] = $parent->tid;
@@ -505,7 +538,3 @@ function views_taxonomy_set_breadcrumb(&$breadcrumb, &$argument) {
$breadcrumb[$path] = check_plain($parent->name);
}
}
-
-/**
- * @}
- */