Get the children pages
@param Page $page
@return \Illuminate\Database\Eloquent\Collection|static[]
436936
private function findChildrenPages(Page $page)
    {
        $pages = Page::where('parent_id', $page->id)->orderBy('header_order')->get();

        return $pages;
    }
806515
public function getPageTemplates(HasPageTemplateInterface $page)
    {
        $pageTemplates = [];
        foreach ($page->getPageTemplates() as $pageTemplate) {
            if (is_string($pageTemplate)) {
                $pt = $this->parser->parse($pageTemplate);
            } elseif ($pageTemplate instanceof PageTemplateInterface) {
                $pt = $pageTemplate;
            } else {
                throw new \Exception("don't know how to handle the pageTemplate " . get_class($pageTemplate));
            }

            $pageTemplates[$pt->getName()] = $pt;
        }

        return $pageTemplates;
    }
1277944
public function TopPeople(int $page = 1): array
    {
        return $this->myanimelist->getTopPeople(
            new Request\Top\TopPeopleRequest($page)
        );
    }
1253377
public static function pageGetArray(?string $page = null): array
    {
        if ($page === null) {
            $page = $_SERVER['PHP_SELF'];
        }
        return self::getArray($page);
    }
668750
public function getOnlinePrevSibling(Page $page)
    {
        $query = $this->createQueryBuilder('p')
                ->andIsSiblingsOf($page, true, ['_leftnode' => 'DESC', '_position' => 'DESC'], 1, 0)
                ->andIsOnline();

        if (true === $page->hasMainSection()) {
            $query->andIsSection()
                    ->andWhere($query->getSectionAlias().'._leftnode < :leftnode')
                    ->setParameter('leftnode', $page->getLeftnode());
        } else {
            $qOR = $query->expr()->orX();
            $qOR->add('p._section != p')
                    ->add($query->getSectionAlias().'._parent = :parent');

            $query->andWhere('p._position < :position')
                    ->andWhere($qOR)
                    ->setParameter('position', $page->getPosition())
                    ->setParameter('parent', $page->getParent()->getSection());
        }

        return $query->getQuery()
                        ->getOneOrNullResult();
    }
1224182
public static function getBySectionOfSite($page)
    {
        $identifier = sprintf('/multilingual/section/%s', $page->getCollectionID());
        $cache = \Core::make('cache/request');
        $item = $cache->getItem($identifier);
        if (!$item->isMiss()) {
            $returnID = $item->get();
        } else {

            $item->lock();

            $returnID = false;

            if ($page->isPageDraft()) {
                $tree = false;
                if ($page->getPageDraftTargetParentPageID()) {
                    $cParentID = $page->getPageDraftTargetParentPageID();
                    if ($cParentID) {
                        $parent = Page::getByID($cParentID);
                        $tree = $parent->getSiteTreeObject();
                    }
                }
            }

            if (!isset($tree)) {
                $tree = $page->getSiteTreeObject();
            }

            if ($tree instanceof SiteTree) {
                $returnID = $tree->getSiteHomePageID();
            }

            $cache->save($item->set($returnID));
        }

        if ($returnID) {
            return static::getByID($returnID);
        }
    }
459776
public function get($objects, $pages = null) {
		$objects = $this->getDatas ( $objects );
		return $this->format ( [ "datas" => $objects,"count" => \sizeof ( $objects ) ] );
	}
89366
public function getAncestorsAction(Page $page)
    {
        $ancestors = $this->getPageRepository()->getAncestors($page);

        return $this->createResponse($this->formatCollection($ancestors));
    }
727433
private function getPagination($page)
    {
        $limit = 5;
        if ($page !== null) {
            if ($page === 'all') {
                $limit = null;
                $page = null;
            } else {
                $page = (int) $page;
            }
        } else {
            $page = 1;
        }

        return ['page' => $page, 'limit' => $limit];
    }
1345419
private function GrantOnPage(Page $page)
    {
        $groups = MembergroupUtil::PageMembergroups($page);
        return $this->GrantByProperties($page->GetGuestsOnly(), $page->GetPublish(), 
                $page->GetPublishFrom(), $page->GetPublishTo(), $groups);
        
    }
428054
public function resolve(Page $page = null)
    {
        if (null === $page || (null === $metadataBag = $page->getMetaData())) {
            $metadataBag = new MetaDataBag();
        }

        if (!is_array($this->definitions)) {
            return $metadataBag;
        }

        foreach ($this->definitions as $name => $definition) {
            if (!is_array($definition)) {
                continue;
            }

            if (null === $metadata = $metadataBag->get($name)) {
                $metadata = new MetaData($name);
                $metadataBag->add($metadata);
            }

            $this->parseDefinition($definition, $metadata, $page);
        }

        return clone $metadataBag;
    }
807155
public function getPagedResults($limit = 50, $page = 0)
    {
        $dql = sprintf(self::DQL_GET_USERS, User::class);

        return $this->getPaginator($dql, $limit, $page);
    }
1193504
public function getPages($deep = false)
    {
        if ($this->has('Kids')) {

            if (!$deep) {
                return $this->get('Kids')->getContent();
            } else {
                $kids  = $this->get('Kids')->getContent();
                $pages = array();

                foreach ($kids as $kid) {

                    if ($kid instanceof Pages) {
                        $pages = array_merge($pages, $kid->getPages(true));
                    } else {
                        $pages[] = $kid;
                    }
                }

                return $pages;
            }
        }

        return array();
    }
142092
protected function getPages(): array
    {
        $pages = [];

        $pages['previous_page'] = $this->pagerfanta->hasPreviousPage() ?
            $this->generateUrl($this->pagerfanta->getPreviousPage()) :
            false;

        $pages['first_page'] = $this->startPage > 1 ? $this->generateUrl(1) : false;
        $pages['mobile_first_page'] = $this->pagerfanta->getCurrentPage() > 2 ? $this->generateUrl(1) : false;

        $pages['second_page'] = $this->startPage === 3 ? $this->generateUrl(2) : false;

        $pages['separator_before'] = $this->startPage > 3;

        $middlePages = [];
        for ($i = $this->startPage, $end = $this->endPage; $i <= $end; ++$i) {
            $middlePages[$i] = $this->generateUrl($i);
        }

        $pages['middle_pages'] = $middlePages;

        $pages['separator_after'] = $this->endPage < $this->pagerfanta->getNbPages() - 2;

        $pages['second_to_last_page'] = $this->endPage === $this->pagerfanta->getNbPages() - 2 ?
            $this->generateUrl($this->pagerfanta->getNbPages() - 1) :
            false;

        $pages['last_page'] = $this->pagerfanta->getNbPages() > $this->endPage ?
            $this->generateUrl($this->pagerfanta->getNbPages()) :
            false;

        $pages['mobile_last_page'] = $this->pagerfanta->getCurrentPage() < $this->pagerfanta->getNbPages() - 1 ?
            $this->generateUrl($this->pagerfanta->getNbPages()) :
            false;

        $pages['next_page'] = $this->pagerfanta->hasNextPage() ?
            $this->generateUrl($this->pagerfanta->getNextPage()) :
            false;

        return $pages;
    }
275237
public function getAllGroups($page, $max = 50)
    {
        $query = $this->groupRepo->findAll(false);
        return $this->pagerFactory->createPager($query, $page, $max);
    }
302708
public function getMentions($page = 1)
    {
        $this->checkPageNumber($page);

        return $this->adapter->get(sprintf('/tracker/mentions?page=%d', $page));
    }
1119173
protected function _pages($pages)
    {
        $html = '';

        //$html .= $pages['first']->active ? '<li>'.$this->_link($pages['first'], '<i class="icon-fast-backward icon-first"></i>').'</li>' : '';

        $html .= $pages['previous']->active ? '<li>'.$this->_link($pages['previous'], '&laquo;').'</li>' : '';

        $previous = null;
        foreach ($pages['pages'] as $page)
        {
            if ($previous && $page->page - $previous->page > 1) {
                $html .= '<li class="k-is-disabled"><span>&hellip;</span></li>';
            }

            $html .= '<li class="'.($page->active && !$page->current ? '' : 'k-is-active').'">';
            $html .= $this->_link($page, $page->page);
            $html .= '</li>';

            $previous = $page;
        }

        $html  .= $pages['next']->active ? '<li>'.$this->_link($pages['next'], '&raquo;').'</li>' : '';

        //$html  .= $pages['last']->active ? '<li>'.$this->_link($pages['last'], '<i class="icon-fast-forward icon-last"></i>').'</li>' : '';

        return $html;
    }