Sets pager
@return array
484235
protected function setPagerListUser()
    {
        $options = $this->query_filter;
        $options['count'] = true;

        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->user->getList($options)
        );

        return $this->data_limit = $this->setPager($pager);
    }
682501
protected function setPagerListCollectionItem()
    {
        $options = $this->query_filter;
        $options['count'] = true;
        $options['collection_id'] = $this->data_collection['collection_id'];

        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->collection_item->getList($options)
        );

        return $this->data_limit = $this->setPager($pager);
    }
422577
protected function setPagerListSearch()
    {
        $options = array(
            'status' => 1,
            'count' => true,
            'store_id' => $this->store_id,
            'language' => $this->langcode
        );

        $pager = array(
            'query' => $this->query_filter,
            'limit' => $this->configTheme('catalog_limit', 20),
            'total' => (int) $this->search->search('product', $this->data_term, $options)
        );

        return $this->data_limit = $this->setPager($pager);
    }
1319022
protected function setPaginate()
    {
        $paginate = $this->findQueryByMethod('paginate');

        $this->queries = $this->queries->reject(function ($query) {
            return $query['method'] == 'paginate';
        });

        if (!$this->usePaginate) {
            $query = [
                'method'    => 'get',
                'arguments' => [],
            ];
        } else {
            $query = [
                'method'    => 'paginate',
                'arguments' => $this->resolvePerPage($paginate),
            ];
        }

        $this->queries->push($query);
    }
151091
public function setPage($page)
  {
    if ($this->isLocked()) {
      return $this->getObj()->setPage($page)->setLocked();
    } else {
      return parent::setPage($page);
    }
  }
296051
public function pager() {
        global $OUTPUT;

        if (!$this->supports_paging()) {
            return '';
        }

        return $OUTPUT->paging_bar(
            count($this->items), $this->page, $this->perpage,
            new moodle_url('/grade/report/singleview/index.php', array(
                'perpage' => $this->perpage,
                'id' => $this->courseid,
                'group' => $this->groupid,
                'itemid' => $this->itemid,
                'item' => 'user'
            ))
        );
    }
131756
public function PagedReplies()
    {
        $list = $this->Replies();

        // Add pagination
        $list = new PaginatedList($list, Controller::curr()->getRequest());
        $list->setPaginationGetVar('repliesstart' . $this->ID);
        $list->setPageLength($this->getOption('comments_per_page'));

        $this->extend('updatePagedReplies', $list);
        return $list;
    }
854937
protected function setPagerListFieldValue()
    {
        $conditions = $this->query_filter;
        $conditions['count'] = true;
        $conditions['field_id'] = $this->data_field['field_id'];

        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->field_value->getList($conditions)
        );

        return $this->data_limit = $this->setPager($pager);
    }
369890
protected function setPageRange()
	{
		$this->page_range = $this->availables_page_range['default'];
		if ( $this->current_page_number > 9992 )
		{
			$this->page_range = $this->availables_page_range['very_short'];
		}
		elseif ( $this->current_page_number > 986 )
		{
			$this->page_range = $this->availables_page_range['short'];
		}

		$this->page_range = ( $this->page_range - 1 );
		$this->start_page_range = $this->current_page_number;
		$this->end_page_range = ( $this->current_page_number + $this->page_range );
		if ( $this->end_page_range > $this->num_pages )
		{
			 $this->end_page_range = $this->num_pages;
		}

		// Calculate deviations at the start or end of the page range ( window ).
		$extra = ( $this->page_range - ( $this->end_page_range - $this->start_page_range ) );
		if ( $extra > 0 )
		{
			if ( $this->end_page_range == $this->num_pages )
			{
				$this->start_page_range = ( $this->start_page_range - $extra );
				if ( $this->start_page_range < 1 )
				{
					$this->start_page_range = 1;
				}
			}
			else
			{
				$this->end_page_range = ( $this->end_page_range + $extra );
				if ( $this->end_page_range > $this->num_pages )
				{
					$this->end_page_range = $this->num_pages;
				}
			}
		}
	}
140619
protected function setPagerListModule()
    {
        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->getListModule(true)
        );

        return $this->data_limit = $this->setPager($pager);
    }
1111495
protected function setPagerListPriceRule()
    {
        $conditions = $this->query_filter;
        $conditions['count'] = true;

        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->price_rule->getList($conditions)
        );

        return $this->data_limit = $this->setPager($pager);
    }
1127346
protected function setPagerlListCart()
    {
        $options = $this->query_filter;
        $options['count'] = true;
        $total = (int) $this->cart->getList($options);

        $pager = array(
            'total' => $total,
            'query' => $this->query_filter
        );

        return $this->data_limit = $this->setPager($pager);
    }
17744
protected function setHeaders()
    {
        \pwf\basic\Application::$instance
            ->getResponse()
            ->setHeaders([
                'x-pagination-current-page: '.$this->getPage(),
                'x-pagination-page-count: '.$this->getPageQty(),
                'x-pagination-per-page: '.max($this->getLimit(), 1),
                'x-pagination-total-count: '.$this->count()
        ]);
        return $this;
    }
926815
protected function setPagerListCurrency()
    {
        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->getListCurrency(true)
        );

        return $this->data_limit = $this->setPager($pager);
    }
1055230
protected function setPagerListReview()
    {
        $conditions = $this->query_filter;
        $conditions['count'] = true;

        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->review->getList($conditions)
        );

        return $this->data_limit = $this->setPager($pager);
    }
13984
protected function setDataRelatedIndexProduct()
    {
        $products = $this->getRelatedProduct();

        if (!empty($products)) {

            $pager_options = array(
                'key' => 'rlp',
                'total' => count($products),
                'limit' => $this->config('related_pager_limit', 4)
            );

            $pager = $this->getPager($pager_options);

            if (!empty($pager['limit'])) {
                list($from, $to) = $pager['limit'];
                $products = array_slice($products, $from, $to);
            }

            $data = array(
                'products' => $products,
                'pager' => $pager['rendered']
            );

            $this->setData('related', $this->render('product/related', $data));
        }
    }
566344
protected function setPagerListImageStyle()
    {
        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->getListImageStyle(true)
        );

        return $this->data_limit = $this->setPager($pager);
    }