DmitryDulepov\Realurl\Encoder\UrlEncoder::fixPageId PHP Method

fixPageId() protected method

Fixes page id if it is not a direct numeric page id.
protected fixPageId ( )
    protected function fixPageId()
    {
        if (!MathUtility::canBeInterpretedAsInteger($this->urlParameters['id'])) {
            // Seems to be an alias
            $alias = $this->urlParameters['id'];
            $this->urlParameters['id'] = $this->pageRepository->getPageIdFromAlias($alias);
            if ($this->urlParameters['id'] === 0) {
                throw new \Exception(sprintf('Page with alias "%s" does not exist.', $alias), 1457183797);
            }
        }
    }