Retrieves the highest page of the groups.

@return int
9565
public function getHighestGroupPage()
    {
        $max = 1;
        $path = $this->prefixWithNamespace('groupPage');
        $groupPages = $this->argumentsAccessor->get($path, []);
        foreach ($groupPages as $groups) {
            if (!is_array($groups)) continue;
            foreach ($groups as $groupItemPage) {
                if ($groupItemPage > $max) {
                    $max = $groupItemPage;
                }
            }
        }

        return $max;
    }
1181070
public function first()
    {
        $page  = $this->page();
        $limit = $this->numPerPage();

        return max(0, (($page - 1) * $limit));
    }
858693
protected function getPagesCount()
    {
        $query = $this->getQueryBuilder()->getQuery();
        $this->applyHints($query);
        $query->useResultCache($this->useCache, $this->cacheLifetime);

        $hasGroupBy = 0 < count($this->getQueryBuilder()->getDQLPart('groupBy'));

        $paginator = new DoctrinePaginator($query);
        // see https://github.com/doctrine/doctrine2/issues/4073
        $paginator->setUseOutputWalkers($hasGroupBy);
        $this->setRecordsCount($paginator->count());

        return ceil($this->getRecordsCount() / $this->getNumberOfElementsPerPage());
    }
32675
public function getPageCount() : int
    {
        return intval($this->count / $this->pageSize) + ($this->count % $this->pageSize == 0 ? 0 : 1);
    }
632378
public function getTotalPages()
    {
        if ($this->totalItems > 0 && $this->itemsPerPage > 0) {
            if (($this->totalItems%$this->itemsPerPage) != 0) {
                return (int)($this->totalItems/$this->itemsPerPage) + 1;
            }
            else {
                return (int)($this->totalItems/$this->itemsPerPage);
            }
        }

        return 0;
    }
237163
public function getPages()
    {
        $pages = [];

        foreach ($this->getLowers() as $lower) {
            $pages[$lower] = Pagination::LOWER;
        }

        if ($this->getCurrent()) {
            $pages[$this->getCurrent()] = Pagination::CURRENT;
        }

        foreach ($this->getHighers() as $higher) {
            $pages[$higher] = Pagination::HIGHER;
        }

        ksort($pages);

        return $pages;
    }
194292
public function getPages()
    {
        return (int)ceil((float)$this->provider->count() / (float)$this->pagelength);
    }
1373794
public function indexGroups($num = 1000, $page = 1)
    {
        if ($this->cache != false) {
            return $this->cacheGroups($num, $page);
        }

        return $this->client->call(
            'GET',
            'components/groups',
            [
                'query' => [
                    'per_page' => $num,
                    'current_page' => $page,
                ],
            ]
        );
    }
1372249
public function getMaxAge()
    {
        $cache_control = $this->getCacheControl();

        if (isset($cache_control['max-age'])) {
            $result = $cache_control['max-age'];
        } else {
            $result = (int) $this->_max_age;
        }

        return (int) $result;
    }
44733
protected function getNumberOfPages()
    {
        $numberOfPages = \ceil($this->totalCount / $this->itemsPerPage);

        if ($this->maximumNumberOfLinks > $numberOfPages) {
            return $numberOfPages;
        }
        return $numberOfPages;
    }
328799
public function pageCount()
    {
        $pageLimit = GeneralUtility::getRootSettingValue('sitemap_page_limit', null);

        if (empty($pageLimit)) {
            $pageLimit = 1000;
        }

        $pageItems = count($this->sitemapPages);
        $pageCount = ceil($pageItems / $pageLimit);

        return $pageCount;
    }
1234768
public function getMaxSort()
    {
        if ($this->_max === null) {
            $this->_max = $this->owner->find()->andWhere($this->getCondition())->count() - 1;
        }
        return $this->_max;
    }
556778
function TopMost()
    {
        $sql = Access::SqlBuilder();
        $tbl = PageContent::Schema()->Table();
        $where = $sql->Equals($tbl->Field('Page'), $sql->Value($this->page->GetID()))->
                And_($sql->Equals($tbl->Field('Area'), $sql->Value($this->area->GetID())))->
                And_($sql->IsNull($tbl->Field('Parent')))
                ->And_($sql->IsNull($tbl->Field('Previous')));
        
        return PageContent::Schema()->First($where);
    }
748066
public function getAllGroupsBySearch($page, $search, $max = 50)
    {
        $query = $this->groupRepo->findAllGroupsBySearch($search);
        return $this->pagerFactory->createPagerFromArray($query, $page, $max);
    }
1008727
public function index()
    {
        $groups = ComponentGroup::query();
        if (!$this->guard->check()) {
            $groups = ComponentGroup::visible();
        }

        $groups->search(Binput::except(['sort', 'order', 'per_page']));

        if ($sortBy = Binput::get('sort')) {
            $direction = Binput::get('order', 'asc');

            $groups->sort($sortBy, $direction);
        }

        $groups = $groups->paginate(Binput::get('per_page', 20));

        return $this->paginator($groups, Request::instance());
    }
1234631
public function index()
    {
        $this->set('groups', $this->paginate($this->Groups, [
            'contain' => [
                'Users' => function ($q) {
                    return $q->select(['Users.id', 'Users.username'])
                        ->order(['Users.username' => 'ASC']);
                }
            ],
            'maxLimit' => 500,
            'limit' => 500
        ]));
        $this->set('_serialize', ['groups']);
    }
156602
private
    function getMaxFightersByEntity($userGroups): int
    {
        return $userGroups
            ->sortByDesc(function ($group) {
                return $group->count();
            })
            ->first()
            ->count();
    }