class image_gallery_handler_field_gallery_count in Image 6
Same name and namespace in other branches
- 7 contrib/image_gallery/views/image_gallery_handler_field_gallery_count.inc \image_gallery_handler_field_gallery_count
Views handler for Image gallery count field. This counts all the nodes in the gallery, including descendant galleries, using taxonomy.module's taxonomy_term_count_nodes.
Hierarchy
- class \image_gallery_handler_field_gallery_count extends \views_handler_field_taxonomy
Expanded class hierarchy of image_gallery_handler_field_gallery_count
1 string reference to 'image_gallery_handler_field_gallery_count'
- image_gallery_views_data_alter in contrib/
image_gallery/ views/ image_gallery.views.inc - Implementation of hook_views_data_alter(). Add fields for image gallery (ie vocabulary terms) to the term_data table.
File
- contrib/
image_gallery/ views/ image_gallery_handler_field_gallery_count.inc, line 8
View source
class image_gallery_handler_field_gallery_count extends views_handler_field_taxonomy {
/**
* Override query() so we don't query: fake field.
*/
function query() {
$this
->ensure_my_table();
$this
->add_additional_fields();
}
/**
* Return field html.
*/
function render($values) {
$count = taxonomy_term_count_nodes($values->tid, 'image');
$output = theme('image_gallery_count', $count);
return $this
->render_link($output, $values);
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
image_gallery_handler_field_gallery_count:: |
function | Override query() so we don't query: fake field. | ||
image_gallery_handler_field_gallery_count:: |
function | Return field html. |