function apachesolr_views_handler_argument_optionwidget::title in Apache Solr Views 6
Get the title this argument will assign the view, given the argument.
File
- handlers/
apachesolr_views_handler_argument_optionwidget.inc, line 47 - Provides an argument handler for optionwidgets so they can use their allowed values
Class
- apachesolr_views_handler_argument_optionwidget
- @file Provides an argument handler for optionwidgets so they can use their allowed values
Code
function title() {
$field = $this->definition['cck_field'];
foreach (content_allowed_values(content_fields($field['field_name'])) as $allowed_value => $nice_text) {
$valid_path = strtolower(str_replace(' ', '-', $nice_text));
if ($this->argument == $valid_path) {
return check_plain($nice_text);
}
}
return check_plain($this->argument);
}