function SarniaViewsHandlerSort::ui_name in Sarnia 7
Provide a custom UI name for the field based on the Solr property.
Overrides views_handler::ui_name
File
- handlers/
handler_sort.inc, line 35
Class
- SarniaViewsHandlerSort
- Really basic sort handler for sorting Solr documents in Views.
Code
function ui_name($short = FALSE) {
if (!empty($this->options['ui_name'])) {
$title = check_plain($this->options['ui_name']);
return $title;
}
$title = $short && isset($this->definition['title short']) ? $this->definition['title short'] : $this->definition['title'];
$title .= ': ' . $this->options['solr_property'];
if (!$short) {
$title = $this->definition['group'] . ': ' . $title;
}
return $title;
}