public function AlphaPagination::getLabel in Views Alpha Pagination 7.2
Retrieves the proper label for a character.
Parameters
$value: The value of the label to retrieve.
Return value
string The label.
File
- src/
AlphaPagination.php, line 508
Class
- AlphaPagination
- A base views handler for alpha pagination.
Code
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;
}