Set pager
@return array
330723
protected function setPagerListCollection()
    {
        $options = $this->query_filter;
        $options['count'] = true;

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

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

        return $this->data_limit = $this->setPager($pager);
    }
938495
public function map(Pagerfanta $pager): array
    {
        $data = [];
        $contentTypeIds = [];

        foreach ($pager as $content) {
            /** @var \eZ\Publish\API\Repository\Values\Content\Content $content */
            $contentInfo = $content->getVersionInfo()->getContentInfo();

            $contributor = (new UserExists($this->userService))->isSatisfiedBy($contentInfo->ownerId)
                ? $this->userService->loadUser($contentInfo->ownerId) : null;

            $contentTypeIds[] = $contentInfo->contentTypeId;
            $data[] = [
                'content' => $content,
                'contentTypeId' => $contentInfo->contentTypeId,
                'contentId' => $content->id,
                'name' => $contentInfo->name,
                'language' => $contentInfo->mainLanguageCode,
                'contributor' => $contributor,
                'version' => $content->versionInfo->versionNo,
                'content_type' => $content->getContentType(),
                'modified' => $content->versionInfo->modificationDate,
                'initialLanguageCode' => $content->versionInfo->initialLanguageCode,
                'content_is_user' => (new ContentIsUser($this->userService))->isSatisfiedBy($content),
            ];
        }

        // load list of Content Types with proper translated names
        $contentTypes = $this->contentTypeService->loadContentTypeList(
            array_unique($contentTypeIds),
            $this->userLanguagePreferenceProvider->getPreferredLanguages()
        );
        foreach ($data as $idx => $item) {
            /** @var \eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType */
            // get content type from bulk-loaded list or fallback to lazy loaded one if not present
            $contentType = isset($contentTypes[$item['contentTypeId']])
                ? $contentTypes[$item['contentTypeId']]
                : $item['content']->getContentType();
            $data[$idx]['type'] = $contentType->getName();
            unset($data[$idx]['content'], $data[$idx]['contentTypeId']);
        }

        return $data;
    }
781649
public function pager(ODataQueryPager $pager = NULL) {
        if (isset($pager)) {
            $this->setPager($pager);
            return $this;
        }
        return $this->getPager();
    }
1156021
protected function setPagerListReportEvent()
    {
        $conditions = $this->query_filter;
        $conditions['count'] = true;

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

        return $this->data_limit = $this->setPager($pager);
    }
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;
    }
1298948
private function setPerPage()
    {
        if ($this->hasInput('per_page'))
        {
            $per_page_input = $this->getInput('per_page');

            if ($this->isValidPageNumber($per_page_input)) {
                $this->perPage = $per_page_input;
            }
            else if ($per_page_input == 'all')
            {
                $this->perPage = 'all';
            }
        }
    }
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);
    }
1053216
public function setPagination()
    {

        $total = $this->getListTotal();

        if (empty($total))
            return null;

        //Get the current page state from the request;
        $limit = $this->getListLimit();
        $current = $this->getState("currentpage", 1);
        $pages = array();

        //@TODO: Calculates the pages from a recordset or an array of results
        $pages['total'] = ceil($total / $limit);
        $pages['limit'] = $limit;

        //Get the real path to the current page
        $route = $this->container->router->getMatchedRoute();


        $pages['current'] = $route->getURLfromPathWithValues(["page" => strval($current)]);
        //Previous page link
        if (intval($current - 1) > 0):
            $pages['previous'] = $route->getURLfromPathWithValues(["page" => strval($current - 1)] );
        endif;
        //Next page link
        if (intval($current + 1) <= $pages['total']):
            $pages['next'] = $route->getURLfromPathWithValues(["page" => strval($current + 1)] );
        endif;

        //Build the pages;
        for ($i = 0; $i < $pages['total']; $i++):
            $page = $i + 1;
            $pages['pages'][] = array(
                "page_title" => strval($page),
                "page_link" => $route->getURLfromPathWithValues(["page" => $page] ),
                "page_state" => ($page == $current) ? "active" : null,
            );
        endfor;

        //Sets the pagination output;
        if (sizeof($pages['pages']) > 1)
            $this->pagination = $pages;

    }
43625
protected function setPagerListCategory()
    {
        $options = $this->query_filter;
        $options['count'] = true;

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

        return $this->data_limit = $this->setPager($pager);
    }
103563
public function setPager(array $options)
    {
        $pager = $this->getPager($options);
        $this->data['_pager'] = $pager['rendered'];
        return $pager['limit'];
    }
604655
protected function setPagerListProduct()
    {
        $conditions = $this->query_filter;
        $conditions['count'] = true;

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

        return $this->data_limit = $this->setPager($pager);
    }
399495
public function setPagerPrefix()
    {
        // Generate pager url prefix
        return 'samsoncms_input_material_application/table/' . (isset($this->nav) ? $this->nav->id : '0') .
        '/' . (isset($this->search{0}) ? $this->search : '0') . '/';
    }
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];
    }
484841
private function setPageStart()
    {
        $firstPage = $this->currentPage - $this->numberLinks;

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

        return $this;
    }
29345
public function Details() {
      if ($this->_PropertiesDefined === FALSE)
         trigger_error(ErrorMessage('You must configure the pager with $Pager->Configure() before retrieving the pager details.', 'MorePager', 'Details'), E_USER_ERROR);
         
      $Details = FALSE;
      if ($this->TotalRecords > 0) {
         if ($this->_Totalled === TRUE) {
            $Details = self::FormatUrl(T('%s$1 to %s$2 of %s$3'), $this->Offset + 1, $this->_LastOffset, $this->TotalRecords);
         } else {
            $Details = self::FormatUrl(T('%s$1 to %s$2'), $this->Offset, $this->_LastOffset);
         }
      }
      return $Details;
   }
360175
protected function setPagerListReportLibrary()
    {
        $pager = array(
            'query' => $this->query_filter,
            'total' => (int) $this->getListReportLibrary(true)
        );

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