You are here

function hook_alpha_pagination_alphabet_alter in Views Alpha Pagination 8.2

Same name and namespace in other branches
  1. 7.2 alpha_pagination.api.php \hook_alpha_pagination_alphabet_alter()

Allows modules and themes to alter the alphabets array prior to rendering.

Note: Do not use range(); always be explicit when defining an alphabet. This is necessary as you cannot rely on the server language to construct proper alphabet characters.

Parameters

array $alphabets: An associative array of key/value pairs, passed by reference. Each key is a corresponding langcode and its value is an indexed array of characters for that langcode.

\views_handler_area_alpha_pagination $view: The View instance.

See also

\views_handler_area_alpha_pagination::getAlphabet()

Related topics

1 invocation of hook_alpha_pagination_alphabet_alter()
AlphaPagination::getAlphabet in src/AlphaPagination.php
Retrieves alphabet characters, based on langcode.

File

./alpha_pagination.api.php, line 34
The API for the Views Alpha Pagination module.

Code

function hook_alpha_pagination_alphabet_alter(array &$alphabets, \views_handler_area_alpha_pagination $view) {

  // Remove Z from the list.
  array_pop($alphabets['en']);
}