protected function createPathComponentThroughOverride()
{
$result = false;
// Can't use $this->pageRepository->getPage() here because it does
// language overlay to TSFE's sys_language_uid automatically.
// We do not want this because we may need to encode to a different language
$page = $this->databaseConnection->exec_SELECTgetSingleRow('*', 'pages', 'uid=' . (int) $this->urlParameters['id']);
$languageExceptionUids = (string) $this->configuration->get('pagePath/languageExceptionUids');
if ($this->sysLanguageUid > 0 && (empty($languageExceptionUids) || !GeneralUtility::inList($languageExceptionUids, $this->sysLanguageUid))) {
$overlay = $this->pageRepository->getPageOverlay($page, $this->sysLanguageUid);
if (is_array($overlay)) {
$page = $overlay;
unset($overlay);
}
}
if ($page['tx_realurl_pathoverride'] && $page['tx_realurl_pathsegment'] !== '') {
$path = trim($page['tx_realurl_pathsegment'], '/');
$this->appendToEncodedUrl($path);
// Mount points do not work with path override. Having them will
// create duplicate path entries but we have to live with this to
// avoid further cache management complications. If we ignore
// mount point information here, we will have to do something
// about it in encodePathComponents() when we fetch from the cache.
// It is easier to have duplicate entries here (one with MP and
// another without it). It does not really matter.
if ($page['doktype'] != PageRepository::DOKTYPE_SPACER && $page['doktype'] != PageRepository::DOKTYPE_RECYCLER) {
$this->addToPathCache($path);
}
$result = true;
}
return $result;
}