protected searchForPathOverrideInPages ( string $path ) : DmitryDulepov\Realurl\Cache\PathCacheEntry | null | ||
$path | string | |
return | DmitryDulepov\Realurl\Cache\PathCacheEntry | null |
protected function searchForPathOverrideInPages($path)
{
$result = null;
$rows = $this->databaseConnection->exec_SELECTgetRows('uid', 'pages', 'tx_realurl_pathoverride=1 AND ' . 'tx_realurl_pathsegment=' . $this->databaseConnection->fullQuoteStr($path, 'pages') . $this->pageRepository->enableFields('pages', 1, array('fe_group' => true)), '', 'sorting');
foreach ($rows as $row) {
if ($this->getRootPageIdForPage((int) $row['uid']) === $this->rootPageId) {
// Found it!
$result = GeneralUtility::makeInstance('DmitryDulepov\\Realurl\\Cache\\PathCacheEntry');
/** @var \DmitryDulepov\Realurl\Cache\PathCacheEntry $result */
$result->setPageId((int) $row['uid']);
$result->setPagePath($path);
$result->setRootPageId($this->rootPageId);
break;
}
}
return $result;
}