Skip to content

Commit

Permalink
feat: add renderPagerUIkit() helper
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Mar 30, 2023
1 parent c2d0a71 commit 43cc908
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions RockFrontend.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -1630,6 +1630,18 @@ public function renderMatrix($items, $vars, $options)
return $out;
}

public function renderPagerUIkit(PageArray $items, $options = [])
{
$options = array_merge([
'numPageLinks' => 5,
'listMarkup' => "<ul class='uk-pagination uk-flex-center'>{out}</ul>",
'nextItemLabel' => '<span uk-pagination-next></span>',
'previousItemLabel' => '<span uk-pagination-previous></span>',
'currentItemClass' => 'uk-active',
], $options);
return $this->html($items->renderPager($options));
}

/**
* @return RockMigrations
*/
Expand Down

0 comments on commit 43cc908

Please sign in to comment.