public function NumericRangeArgument::title in Views Contextual Range Filter 8
Title override.
Required because of range version of breakPhrase() in this function.
Overrides NumericArgument::title
File
- src/
Plugin/ views/ argument/ NumericRangeArgument.php, line 41
Class
- NumericRangeArgument
- Argument handler to accept a numeric range.
Namespace
Drupal\contextual_range_filter\Plugin\views\argumentCode
public function title() {
if (!$this->argument) {
return $this->definition['empty field name'] ?: t('Uncategorized');
}
if (!empty($this->options['break_phrase'])) {
$this
->breakPhraseRange($this->argument);
}
else {
$this->value = [
$this->argument,
];
$this->operator = 'or';
}
if ($this->value === FALSE) {
return $this->definition['invalid input'] ?: t('Invalid input');
}
if (empty($this->value)) {
return $this->definition['empty field name'] ?: t('Uncategorized');
}
return implode($this->operator == 'or' ? ' + ' : ', ', $this->value);
}