Created
June 21, 2019 06:20
-
-
Save bmack/5072de0e6704726191f65e32c69666cc to your computer and use it in GitHub Desktop.
Revisions
-
bmack created this gist
Jun 21, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ /** * Generates an absolute URL for a page (based on Site Handling) * * @param int $pageId * @param array|null $arguments * @return UriInterface * @throws \TYPO3\CMS\Core\Exception\SiteNotFoundException * @throws \TYPO3\CMS\Core\Routing\InvalidRouteArgumentsException */ private function getUrlForPage(int $pageId, array $arguments = null): UriInterface { $site = GeneralUtility::makeInstance(SiteFinder::class)->getSiteByPageId($pageId); return $site->getRouter()->generateUri($pageId, $arguments); }