Receives a page in a different language tree, and tries to return the corresponding page in the current language tree.

@return int|null
2740
public function getTranslatedPageID($page)
    {
        $ids = static::getIDList();
        if (in_array($page->getCollectionID(), $ids)) {
            return $this->locale->getSiteTree()->getSiteHomePageID();
        }

        $mpRelationID = self::getMultilingualPageRelationID($page->getCollectionID());

        if ($mpRelationID) {
            $cID = self::getCollectionIDForLocale($mpRelationID, $this->getLocale());

            return $cID;
        }
    }
836406
public function getCountry()
    {
        if (strstr(Yii::app()->language, '_')) {
            return substr(strstr(Yii::app()->language, '_'), 1);
        } else {
            return null;
        }
    }
511734
public function getOriginOfPageByPageIdAction()
    {
        $data = array();
        $tool = $this->getServiceLocator()->get('MelisCmsPage');
        $data = $tool->getOriginOfPage()->toArray();

        return $data;

    }
854909
public function getNextPage()
    {
        $nextPageIndex = $this->currentPage->getIndex() + 1;
        if (!$this->formDefinition->hasPageWithIndex($nextPageIndex)) {
            return null;
        }
        return $this->formDefinition->getPageByIndex($nextPageIndex);
    }
1329978
public function next()
    {
        if ((int) $this->current()->query->getValue('o') >= $this->nbPages) {
            return null;
        }

        return $this->getIndexUrl(+1);
    }
1103088
protected function scanNewline()
    {
        if ('' !== $this->getTrimmedLine()) {
            return null;
        }

        $token = $this->takeToken('Newline', mb_strlen($this->line, 'utf8'));
        $this->consumeLine();

        return $token;
    }
443679
public function getParentPseudoPage()
    {
        $page = $this->getPseudoPage();
        if ($page && $page->parent) {
            return $page->parent->getPseudoPage();
        }
        return null;
    }
351190
public function getPage()
	{
		return $this->offset > $this->limit ? floor($this->offset / $this->limit) : 1;
	}
542073
public function getCurrentPageNumber()
    {
        $optionsRenderer = $this->getOptionsRenderer();
        $parameterNames = $optionsRenderer['parameterNames'];

        $request = $this->getRequest();
        if ($request instanceof HttpRequest) {
            $this->currentPageNumber = (int) $request->getPost(
                $parameterNames['currentPage'],
                $request->getQuery($parameterNames['currentPage'], 1)
            );
        }

        return (int) $this->currentPageNumber;
    }
1331089
private function findRootPages(): array
    {
        $result = [
            'source' => null,
            'target' => null,
            'main'   => null,
        ];

        $this->logger->debug(
            'Searching root pages for source "{source}" and target "{target}"',
            ['source' => $this->sourceLanguage, 'target' => $this->targetLanguage]
        );
        foreach ($this->database->getRootPages() as $root) {
            $language = $root['language'];

            if ('1' === $root['fallback']) {
                $this->mainLanguage = $language;
                $result['main']     = (int) $root['id'];
            }

            if ($language === $this->sourceLanguage) {
                $result['source'] = (int) $root['id'];
            }
            if ($language === $this->targetLanguage) {
                $result['target'] = (int) $root['id'];
            }

            // Keep type for being able to filter unknown pages in i.e. articles.
            $this->types[(int) $root['id']] = 'root';
        }

        $this->logger->debug(
            'Found root pages: source: {source}; target: {target}; main: {main}',
            $result
        );

        if (null === $result['source'] || null === $result['target'] || null === $result['main']) {
            throw new \RuntimeException('Not all root pages could be found: ' . var_export($result, true));
        }

        return $result;
    }
108778
public function getOverviewPage()
    {
        $repository = $this->getOverviewPageRepository();
        $pages = $repository->findActiveOverviewPages();

        if (isset($pages) && count($pages) > 0) {
            return $pages[0];
        }

        return null;
    }
64100
public function getCurrent(): ?PageInterface
    {
        if (false === $this->currentPage) {
            if (null === $this->request) {
                throw new \RuntimeException('The page helper must be initialized first.');
            }
            $this->currentPage = $this->findByRequest($this->request);
        }

        return $this->currentPage;
    }
504365
public function getCurrentPage()
	{
		$page = (int) $this->currentPage ?: $this->request->query->get($this->pageName, 1);

		if ($page < 1 || filter_var($page, FILTER_VALIDATE_INT) === false)
		{
			return 1;
		}

		return $page;
	}
594886
public function getPage(int $pageNumber)
    {
        $pages = $this->getPages();

        if (isset($pages[$pageNumber - 1])) {
            return $pages[$pageNumber - 1];
        }

        return null;
    }
46770
public function getSiteLanguage()
    {
        if (is_null($this->language) && ($request = $this->requestStack->getMasterRequest())) {
            $this->language = $request->get('language', $request->getLocale());
        }

        return $this->language;
    }
242726
public function current()
    {
        if (!$this->page) {
            $this->page = $this->executeCall();
        }

        $this->moreResultsType = isset($this->page['batch']['moreResults'])
            ? $this->page['batch']['moreResults']
            : null;

        return $this->get($this->itemsPath, $this->page);
    }
790239
public function getHolderPage()
    {
        if (!$this->PageID && !$this->ElementID) return null;

        $holder = $this->getHolder();
        while (
            $holder
            && $holder->exists()
            && !is_a($holder, SiteTree::class)
        ) {
            $holder = $holder->getHolder();
        }

        return $holder;
    }