Set pager
@return array
327460
protected function setPagerlListCountry()
    {
        $conditions = $this->query_filter;
        $conditions['count'] = true;

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

        return $this->data_limit = $this->setPager($pager);
    }
570330
protected function setPagerOrderIndexAccount()
    {
        $conditions = array(
            'count' => true,
            'user_id' => $this->data_user['user_id']
        );

        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->order->getList($conditions),
            'limit' => $this->config('account_order_limit', 10)
        );

        return $this->data_limit = $this->setPager($pager);
    }
1067212
public function setPager ($total_count, $current_page, $url, $limit = PagerUtility::DISP_PER_PAGE, $options = []) {
 		$current_page	= $current_page ?: 1;
 		$options		= [
			'in_list_position'	=> $options['in_list_position']	?? 3,
			'max_link_disp'		=> $options['max_link_disp'] ?? 5,
 		];
 		$this->pager = PagerUtility::CreatePagerData($total_count, $current_page, $limit, $options);
 		$this->pager['enable']	= $total_count > $limit;
 		$this->pager['url']		= $url;

 		return $this->pager;
 	}
491661
public function getPagination(): array
    {
        if ($this->pagination === null) {
            $this->pagination = $this->setPagination();
        }

        return $this->pagination;
    }
391809
protected function setPagerListBlog()
    {
        $pager = array(
            'total' => $this->data_total,
            'query' => $this->query_filter,
            'limit' => $this->configTheme('blog_limit', 20)
        );

        return $this->data_limit = $this->setPager($pager);
    }
1050217
protected function setPagerListReportPayment()
    {
        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->getListReportPayment(true)
        );

        return $this->data_limit = $this->setPager($pager);
    }
393663
public function set(): PageInterface
    {
        $hook = $this->isNetwork() ? 'network_admin_menu' : 'admin_menu';

        // Action for page display.
        $this->action->add($hook, [$this, 'build']);
        // Action for page settings.
        $this->action->add('admin_init', [$this, 'configureSettings']);

        return $this;
    }
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);
    }
271167
public function setPage(Page $page)
    {
        $this->_page = $page;
        $page->setMainSection($this);

        return $this;
    }
140619
protected function setPagerListModule()
    {
        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->getListModule(true)
        );

        return $this->data_limit = $this->setPager($pager);
    }
1235801
protected function _setData() {
        if (($this->_currentPage == 0)) {
            $linkDisabled = false;
        }
        else {
            $linkDisabled = true;
        }

        if ($this->_currentPage < 1) {
            $this->_currentPage = 1;
        }

        $this->_nbrPage = ceil($this->_entry / $this->_byPage);

        if ($this->_nbrPage == 0) {
            $this->_nbrPage = 1;
        }

        if ($this->_currentPage > $this->_nbrPage) {
            $this->_currentPage = $this->_nbrPage;
        }

        if ($this->_currentPage == 1) {
            $this->_paginationFirstBefore = false;
        }

        if ($this->_currentPage == $this->_nbrPage) {
            $this->_paginationLastAfter = false;
        }

        //useless to hide links if there isn't pages enough
        if ($this->_paginationCut == false || $this->_paginationCut > $this->_nbrPage) {
            for ($i = 1; $i <= $this->_nbrPage; $i++) {
                if ($i == $this->_currentPage && $linkDisabled != false) {
                    $this->_paginationList[$i] = false;
                }
                else {
                    $this->_paginationList[$i] = preg_replace('#\{page\}#isU', $i, $this->_url);
                }
            }
        }
        else {
            if ($this->_paginationCut > (($this->_nbrPage / 2) - 2)) {
                $this->_paginationCut = intval(($this->_nbrPage / 2));
            }

            if ($this->_paginationCut < 1) {
                $this->_paginationCut = 1;
            }

            if (($this->_currentPage - $this->_paginationCut) > 0 && ($this->_currentPage + $this->_paginationCut) < $this->_nbrPage) {
                for ($i = $this->_currentPage - $this->_paginationCut; $i <= $this->_currentPage + $this->_paginationCut; $i++) {
                    if ($i == $this->_currentPage && $linkDisabled != false) {
                        $this->_paginationList[$i] = false;
                    }
                    else {
                        $this->_paginationList[$i] = preg_replace('#\{page\}#isU', $i, $this->_url);
                    }
                }
            }
            elseif (($this->_currentPage - $this->_paginationCut) > 0 && ($this->_currentPage + $this->_paginationCut) >= $this->_nbrPage) {
                for ($i = $this->_currentPage - $this->_paginationCut; $i <= $this->_nbrPage; $i++) {
                    if ($i == $this->_currentPage && $linkDisabled != false) {
                        $this->_paginationList[$i] = false;
                    }
                    else {
                        $this->_paginationList[$i] = preg_replace('#\{page\}#isU', $i, $this->_url);
                    }
                }
            }
            elseif (($this->_currentPage - $this->_paginationCut) <= 0 && ($this->_currentPage + $this->_paginationCut) < $this->_nbrPage) {
                for ($i = 1; $i <= $this->_currentPage + $this->_paginationCut; $i++) {
                    if ($i == $this->_currentPage && $linkDisabled != false) {
                        $this->_paginationList[$i] = false;
                    }
                    else {
                        $this->_paginationList[$i] = preg_replace('#\{page\}#isU', $i, $this->_url);
                    }
                }
            }
            else {
                for ($i = 1; $i <= $this->_nbrPage; $i++) {
                    if ($i == $this->_currentPage && $linkDisabled != false) {
                        $this->_paginationList[$i] = false;
                    }
                    else {
                        $this->_paginationList[$i] = preg_replace('#\{page\}#isU', $i, $this->_url);
                    }
                }
            }
        }
    }
517635
protected function findInitializedPagerId()
    {
        foreach ($this->pagers as $key => $pager) {
            if (isset($pager->totalpages)) {
                return $key;
            }
        }

        return '';
    }
484841
private function setPageStart()
    {
        $firstPage = $this->currentPage - $this->numberLinks;

        if ($firstPage >= 1) {
            $this->pageStart = $firstPage;
        } else {
            $this->pageStart = 1;
        }

        return $this;
    }
1049363
public function decodeHttpQuery()
    {
        $values = [];

        foreach ($this->getRequest()->query->all() as $key => $parameter) {
            if (strpos($key, self::PAGE) === 0) {
                $chunks = explode('_', $key);
                $contextId = end($chunks);
                $pager = new Pager($this);
                $pager->setFor($contextId)->setCurrent($parameter);
                $values[$key] = $pager;
            }
        }

        return $values;
    }
715684
protected function paginationRanger()
    {
        $parameters = [
            'first' => $this->paginator->firstItem(),
            'last'  => $this->paginator->lastItem(),
            'total' => $this->paginator->total(),
        ];

        $parameters = collect($parameters)->flatMap(function ($parameter, $key) {
            return [$key => "<b>$parameter</b>"];
        });

        return trans('admin.pagination.range', $parameters->all());
    }
769341
protected function setPagerListFile()
    {
        $conditions = $this->query_filter;
        $conditions['count'] = true;

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

        return $this->data_limit = $this->setPager($pager);
    }
1227125
public function renderPager()
	{
		if(!$this->enablePagination)
			return;

		$pager=array();
		$class='CLinkPager';
		if(is_string($this->pager))
			$class=$this->pager;
		elseif(is_array($this->pager))
		{
			$pager=$this->pager;
			if(isset($pager['class']))
			{
				$class=$pager['class'];
				unset($pager['class']);
			}
		}
		$pager['pages']=$this->dataProvider->getPagination();

		if($pager['pages']->getPageCount()>1)
		{
			echo '<div class="'.$this->pagerCssClass.'">';
			$this->widget($class,$pager);
			echo '</div>';
		}
		else
			$this->widget($class,$pager);
	}