Sets pager
@return array
962916
protected function setPagerListLanguage()
    {
        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->getListLanguage(true)
        );

        return $this->data_limit = $this->setPager($pager);
    }
838776
protected function setPagerListCategoryGroup()
    {
        $options = $this->query_filter;
        $options['count'] = true;

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

        return $this->data_limit = $this->setPager($pager);
    }
872952
public function PaginatedList()
    {
        $allPosts = $this->blogPosts ?: ArrayList::create();
        $posts = PaginatedList::create($allPosts);

        // Set appropriate page size
        if ($this->PostsPerPage > 0) {
            $pageSize = $this->PostsPerPage;
        } elseif ($count = $allPosts->count()) {
            $pageSize = $count;
        } else {
            $pageSize = 99999;
        }
        $posts->setPageLength($pageSize);

        // Set current page
        $start = (int)$this->request->getVar($posts->getPaginationGetVar());
        $posts->setPageStart($start);

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

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

        return $this;
    }
1334551
protected function setPagerListStore()
    {
        $conditions = $this->query_filter;
        $conditions['count'] = true;

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

        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;
 	}
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);
    }
154752
protected function pager()
    {
        if ($this->pager === null) {
            $this->pager = $this->createPagination();
        }

        return $this->pager;
    }
517252
protected function _setPageFooter()
    {
        if (!count($this->_subFOOTER)) {
            return false;
        }

        if (in_array($this->pdf->getPage(), $this->_hideFooter)) {
            return false;
        }

        $oldParsePos = $this->_parsePos;
        $oldParseCode = $this->parsingHtml->code;

        $this->_parsePos = 0;
        $this->parsingHtml->code = $this->_subFOOTER;
        $this->_isInFooter = true;
        $this->_makeHTMLcode();
        $this->_isInFooter = false;

        $this->_parsePos = $oldParsePos;
        $this->parsingHtml->code = $oldParseCode;
    }
537454
protected function setBrowser()
    {
        if (is_array(static::$browsers) && count(static::$browsers) > 0) {
            foreach (static::$browsers as $key => $val) {
                if (preg_match('|' . $key . '.*?([0-9\.]+)|i', $this->string, $match)) {
                    $this->isBrowser = true;
                    $this->browserVersion = $match[ 1 ];
                    $this->browser = $val;
                    $this->setMobile();

                    return true;
                }
            }
        }

        return false;
    }
245475
protected function setPagerListReportRoute()
    {
        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->getListReportRoute(true)
        );

        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);
    }
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);
    }
647903
protected function setPage ()
        {
            $urlTemplates = [];

            if ($this->arParams['SEF_MODE'] === 'Y')
            {
                $variables = [];

                $urlTemplates = \CComponentEngine::MakeComponentUrlTemplates (
                    $this->defaultUrlTemplates404,
                    $this->arParams['SEF_URL_TEMPLATES']
                );

                $variableAliases = \CComponentEngine::MakeComponentVariableAliases (
                    $this->defaultUrlTemplates404,
                    $this->arParams['VARIABLE_ALIASES']
                );

                $this->templatePage = \CComponentEngine::ParseComponentPath (
                    $this->arParams['SEF_FOLDER'],
                    $urlTemplates,
                    $variables
                );

                if (!$this->templatePage)
                {
                    if ($this->arParams['SET_404'] === 'Y')
                    {
                        $folder404 = str_replace ('\\', '/', $this->arParams['SEF_FOLDER']);

                        if ($folder404 != '/')
                        {
                            $folder404 = '/' . trim ($folder404, "/ \t\n\r\0\x0B") . "/";
                        }

                        if (substr ($folder404, - 1) == '/')
                        {
                            $folder404 .= 'index.php';
                        }

                        if ($folder404 != Main\Context::getCurrent ()->getRequest ()->getRequestedPage ())
                        {
                            $this->return404 ();
                        }
                    }

                    $this->templatePage = $this->defaultSefPage;
                }

                if ($this->isSearchRequest () && $this->arParams['USE_SEARCH'] === 'Y')
                {
                    $this->templatePage = 'search';
                }

                \CComponentEngine::InitComponentVariables (
                    $this->templatePage,
                    $this->componentVariables,
                    $variableAliases,
                    $variables
                );

                $models = $this->setModels ();
            } else
            {
                $this->templatePage = $this->defaultPage;
            }

            $this->sefFolder = $this->arParams['SEF_FOLDER'];
            $this->urlTemplates = $urlTemplates;
            $this->variables = $variables;
            $this->variableAliases = $variableAliases;
            $this->models = $models;
        }
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;
    }
360370
public function setCurrentPageNumber($pageNumber)
    {
        $this->currentPageNumber = (int) $pageNumber;
        $this->currentItems      = null;
        $this->currentItemCount  = null;

        return $this;
    }
1349903
protected function getPageRule()
    {
        $existsRule = Rule::exists($this->getTablePrefix().'pages', 'id')->using(function ($query) {
            if ($this->has('locale'))
                $query->where('locale', $this->get('locale', config('app.locale')));
        });

        return ['required', 'integer', $existsRule];
    }