public function AlphaPagination::getLabel in Views Alpha Pagination 8.2
Retrieves the proper label for a character.
Parameters
mixed $value: The value of the label to retrieve.
Return value
string The label.
File
- src/
AlphaPagination.php, line 640
Class
- AlphaPagination
- A base views handler for alpha pagination.
Namespace
Drupal\alpha_paginationCode
public function getLabel($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')]
->getLabel();
}
elseif (isset($characters[$value])) {
return $characters[$value]
->getLabel();
}
// Return the original value.
return $value;
}