+ foreach ($this->order() as $order) {
+ if (!is_null($order)) {
+ $this->set->addSort($order);
+ }
+ }
+ $res = $this->set->get($this->limit());
+
+ $show_bounds = $this->bounds();
+ if ($show_bounds) {
+ $start = current($res);
+ $end = end($res);
+ if ($show_bounds == 1) {
+ $first = $this->getBoundValue($start);
+ $last = $this->getBoundValue($end);
+ } elseif ($show_bounds == -1) {
+ $first = $this->getBoundValue($end);
+ $last = $this->getBoundValue($start);
+ }
+ $page->assign('first', $first);
+ $page->assign('last', $last);
+ }
+
+ $page->assign('show_bounds', $show_bounds);