public function AlphaPagination::getValue in Views Alpha Pagination 8.2
Retrieves the proper value for a character.
Parameters
mixed $value: The value to retrieve.
Return value
string The value.
File
- src/
AlphaPagination.php, line 830
Class
- AlphaPagination
- A base views handler for alpha pagination.
Namespace
Drupal\alpha_paginationCode
public function getValue($value) {
$characters = $this
->getCharacters();
// Return an appropriate numeric label.
if ($this
->getOption('paginate_view_numbers') === '2' && $this
->isNumeric($value)) {
return $characters[$this
->getOption('paginate_numeric_value')]
->getValue();
}
elseif (isset($characters[$value])) {
return $characters[$value]
->getLabel();
}
// Return the original value.
return $value;
}