Skip to content
Snippets Groups Projects
Commit 9f93b725 authored by azuryte's avatar azuryte Committed by Florent Torregrosa
Browse files

Issue #3415109 by azuryte: Update pager preprocess hook

parent fb6da33b
No related branches found
No related tags found
1 merge request!177Issue #3415109 by azuryte: Update pager preprocess hook
......@@ -41,11 +41,14 @@ function ui_suite_bootstrap_preprocess_breadcrumb(array &$variables): void {
* Implements hook_preprocess_HOOK() for 'pager'.
*/
function ui_suite_bootstrap_preprocess_pager(array &$variables): void {
if (!isset($variables['items'])) {
return;
}
$before = LinksSettingType::normalize(array_filter([
$variables["items"]["first"] ?: [],
$variables["items"]["previous"] ?: [],
$variables['items']['first'] ?: [],
$variables['items']['previous'] ?: [],
]));
$pages = LinksSettingType::normalize($variables["items"]["pages"]);
$pages = LinksSettingType::normalize($variables['items']['pages'] ?? []);
unset($pages[$variables["current"] - 1]["url"]);
$after = LinksSettingType::normalize(array_filter([
$variables["items"]["next"] ?: [],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment