*
* This pager automatically identifies if the sorting is done increasingly or decreasingly if the first item id†
* and last item id† are different. Otherwise it defaults to decreasingly like reverse chronological lists.
*
* This pager automatically identifies if the sorting is done increasingly or decreasingly if the first item id†
* and last item id† are different. Otherwise it defaults to decreasingly like reverse chronological lists.
* @param string $last_item_id The id† of the last item in the displayed item list
* @param integer $itemsPerPage An optional number of items per page to override the default value
*/
* @param string $last_item_id The id† of the last item in the displayed item list
* @param integer $itemsPerPage An optional number of items per page to override the default value
*/
- public function __construct(L10n $l10n, $queryString, $first_item_id = null, $last_item_id = null, $itemsPerPage = 50)
+ public function __construct(L10n $l10n, string $queryString, string $first_item_id = null, string $last_item_id = null, int $itemsPerPage = 50)
* $params = ['order' => ['sort_field' => true], 'limit' => $itemsPerPage];
* $items = DBA::toArray(DBA::select($table, $fields, $condition, $params));
*
* $params = ['order' => ['sort_field' => true], 'limit' => $itemsPerPage];
* $items = DBA::toArray(DBA::select($table, $fields, $condition, $params));
*
- * $pager = new BoundariesPager($a->query_string, $items[0]['sort_field'], $items[coutn($items) - 1]['sort_field'], $itemsPerPage);
+ * $pager = new BoundariesPager($a->query_string, $items[0]['sort_field'], $items[count($items) - 1]['sort_field'], $itemsPerPage);
'prev' => [
'url' => Strings::ensureQueryParameter($this->baseQueryString .
($this->first_item_id >= $this->last_item_id ?
'prev' => [
'url' => Strings::ensureQueryParameter($this->baseQueryString .
($this->first_item_id >= $this->last_item_id ?
),
'text' => $this->l10n->t('newer'),
'class' => 'previous' . ($this->first_page ? ' disabled' : '')
),
'text' => $this->l10n->t('newer'),
'class' => 'previous' . ($this->first_page ? ' disabled' : '')
'next' => [
'url' => Strings::ensureQueryParameter($this->baseQueryString .
($this->first_item_id >= $this->last_item_id ?
'next' => [
'url' => Strings::ensureQueryParameter($this->baseQueryString .
($this->first_item_id >= $this->last_item_id ?
),
'text' => $this->l10n->t('older'),
'class' => 'next' . ($displayedItemCount < $this->getItemsPerPage() ? ' disabled' : '')
),
'text' => $this->l10n->t('older'),
'class' => 'next' . ($displayedItemCount < $this->getItemsPerPage() ? ' disabled' : '')