userpoints_views_handler_argument_category.inc in User Points 6
File
views/userpoints_views_handler_argument_category.inc
View source
<?php
class userpoints_views_handler_argument_category extends views_handler_argument {
function construct() {
parent::construct('category');
}
function summary_name($data) {
return $this
->category($data->{$this->name_alias});
}
function title() {
return $this
->category($this->argument);
}
function category($id) {
$output = userpoints_get_categories();
if (empty($output[$id])) {
$output = t('Unknown category');
}
return check_plain($output[$id]);
}
}