Set the page with paginate attribute.

@param int $page
@param int $limit

@return $this
167734
public function paginate($limit = 25, $page = 0)
    {
        if ($limit > 0) {
            $this->queryBuilder->setMaxResults($limit);
        }

        if ($page > 0) {
            $this->queryBuilder->setFirstResult($page * $limit);
        }

        return $this;
    }
1093112
public function paginate($page, $limit)
    {
        if (!$this->getModelClass()) {
            throw new ModelNotFoundException('setModelClass');
        }

        /** @var DocumentManager $manager */
        $manager = $this->getManager();
        $queryBuilder = $manager->createQueryBuilder($this->getModelClass());

        $filterList = new FilterQueryEvent();
        $filterList->setQueryBuilder($queryBuilder);
        $filterList->setModelClass($this->getModelClass());

        $this->getEventSubscriber()->subscribe(Constants::FILTER_LIST, $filterList);

        $query = $filterList->getQueryBuilder()->getQuery();

        return $this->getPaginator()->paginate($query, $page, $limit);
    }
985225
public function setPage($page)
    {
        if ($page > $this->getNumberOfPages() || $page < 1) {
            throw new PageDoesNotExist("Page {$page} does not exist");
        }

        $this->page = $page;

        return $this;
    }
1048782
public function setCurrentPage($page)
  {
    $this->currentPage = $page;
    $this->forcedPage = true;
    $this->updateTable();
  }
449622
public function get(int $page, int $limit = 10): \Illuminate\Pagination\LengthAwarePaginator
    {
        if (!$this->_columns && !$this->_query) {
            return null;
        }
        $countTotal = $this->_query->count();
        $this->_query->skip(($limit * $page) - $limit);
        $this->_query->limit($limit);
        $data = collect();
        foreach ($this->_query->get() as $key => $instance) {
            if ($instance instanceof \Illuminate\Database\Eloquent\Model) {
                $_listRow = [];
                foreach ($this->_columns->getColumns() as $column) {
                    $_listRow[$column->getKey()] = $column->getValues($instance);
                }
                $buttons = $this->_columns->filterActions($instance);
                if (count($buttons)) {
                    $_listRow = array_merge($_listRow, [Column::ACTION_NAME => implode('', $buttons)]);
                }
                $data->offsetSet($key, $_listRow);
            }
        }
        $this->_data = new \Illuminate\Pagination\LengthAwarePaginator($data, $countTotal, $limit, $page, [
            'path'     => \Illuminate\Pagination\Paginator::resolveCurrentPath(),
            'pageName' => 'page',
        ]);

        return $this->_data;
    }
11370
public function page($page)
    {
        if (! $this->limit) return;
        $offset = $this->limit * ($page - 1);
        $this->offset($offset);
        return $this;
    }
705043
public function setPage($page)
    {
        $this->page = intval($page);
        
        if ($this->page == 0) {
            $this->page = 1;
        }
    }
910025
public function limit($page, $length)
    {
        $this->page = $page;
        $this->length = $length;

        return $this;
    }
1023214
public function setPagination($currentPage, $perPage = null)
    {

        $this->currentPageNumber = $this->isValidPageNumber($currentPage) ? $currentPage : 1;
        $defaultPerPage = $this->perPage ? $this->perPage : static::$perPageDefault;
        $this->perPage = $perPage ?: $defaultPerPage;
        $this->pages = null;
        return $this;
    }
1252551
public function perPage($per_page)
    {
        $this->limit = $per_page;
        $this->offset = ($this->page - 1) * $per_page;
        return $this;
    }
300815
public function setPage($page)
    {
        if ($page < 1) {
            $page = 1;
        }

        if ($this->range == 0) {
            $this->setRange(25);
        }

        $this->start = ($page - 1) * $this->range;

        return $this;
    }
1220507
public function page($page, $count)
    {
        $pagination = new Pagination($page, $count);
        $this->option->offset = $pagination->getLimitOffset();
        $this->option->limit = $count;
        return $this;
    }
746056
public function page($limit, $offset)
    {
        $this->limit = $limit;
        $this->offset = $offset;
        return $this;
    }
522577
public function findAllWithoutFetchPaged($page = 0, $limit = 20) {
    $offset = $page * $limit;
    $results = $this->createQuery()
      ->setFirstResult($offset)
      ->setMaxResults($limit)
      ->execute();
    return $results;
  }
357826
public function limitPage($page, $rowCount)
    {
        $page     = ($page > 0)     ? $page     : 1;
        $rowCount = ($rowCount > 0) ? $rowCount : 1;
        $this->_parts[self::LIMIT_COUNT]  = (int) $rowCount;
        $this->_parts[self::LIMIT_OFFSET] = (int) $rowCount * ($page - 1);
        return $this;
    }
1088238
public function getPagedResults($limit = 50, $page = 0)
    {
        $dql = sprintf(self::DQL_GET_PAGED, AuditEvent::class);
        return $this->getPaginator($dql, $limit, $page);
    }
1149399
public function setPagination($param, $limit = null)
    {
        if ($param instanceof PaginationInterface) {
            $pager = $param;
        } elseif (is_numeric($param)) {
            $pager = $this->createPagination();
            $pager->setPage($param);
            $pager->setNumPerPage($limit);
        } elseif (is_array($param)) {
            $pager = $this->createPagination();
            $pager->setData($param);
        } else {
            throw new InvalidArgumentException(
                'Can not set pagination, invalid argument.'
            );
        }

        $this->pagination = $pager;

        return $this;
    }