You are here

public function AlphaPagination::getValue in Views Alpha Pagination 7.2

Retrieves the proper value for a character.

Parameters

$value: The value to retrieve.

Return value

string The value.

File

src/AlphaPagination.php, line 697

Class

AlphaPagination
A base views handler for alpha pagination.

Code

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;
}