function views_node_taxonomy_filter_handler_filter_tid::admin_summary in Views Node Taxonomy Filter 7
Same name and namespace in other branches
- 6 views_node_taxonomy_filter_handler_filter_tid.inc \views_node_taxonomy_filter_handler_filter_tid::admin_summary()
Display the value of the Filter selection in the Views edit screens.
Overrides views_handler_filter::admin_summary
File
Class
Code
function admin_summary() {
$vocabularies = taxonomy_get_vocabularies();
$vocab_name = '';
foreach ($vocabularies as $vocabulary) {
if (is_array($this->value[0])) {
foreach ($this->value[0] as $voc) {
if ($vocabulary->machine_name == $voc) {
$vocab = $vocabularies[$vocabulary->vid];
$vocab_name .= $vocab->name . ', ';
}
}
}
else {
if ($vocabulary->machine_name == $this->value[0]) {
$vocab = $vocabularies[$vocabulary->vid];
$vocab_name = $vocab->name;
}
}
}
$vocab_name = rtrim($vocab_name, ', ');
return t("for Vocabulary: @vocab_name", array(
'@vocab_name' => $vocab_name,
));
}