Commit 8d035b42 authored by Benni Mack's avatar Benni Mack
Browse files

[TASK] Use shorthand version for various getLanguageOverlay occurrences

Resolves: #96611
Releases: main
Change-Id: I82e2063a7d17d29bf9e6b872329bb809ba8a3868
parent 4fb032c9
Pipeline #22358 passed with stages
in 15 minutes and 18 seconds
......@@ -260,10 +260,6 @@ class PersistedAliasMapper implements PersistedMappableAspectInterface, StaticMa
return $queryBuilder;
}
/**
* @param array|null $record
* @return array|null
*/
protected function resolveOverlay(?array $record): ?array
{
$languageId = $this->siteLanguage->getLanguageId();
......@@ -272,16 +268,9 @@ class PersistedAliasMapper implements PersistedMappableAspectInterface, StaticMa
}
$pageRepository = $this->createPageRepository();
if ($this->tableName === 'pages') {
return $pageRepository->getPageOverlay($record, $languageId);
}
return $pageRepository
->getRecordOverlay($this->tableName, $record, $languageId) ?: null;
return $pageRepository->getLanguageOverlay($this->tableName, $record) ?: null;
}
/**
* @return PageRepository
*/
protected function createPageRepository(): PageRepository
{
$context = clone GeneralUtility::makeInstance(Context::class);
......
......@@ -304,10 +304,6 @@ class PersistedPatternMapper implements PersistedMappableAspectInterface, Static
return $constraints;
}
/**
* @param array|null $record
* @return array|null
*/
protected function resolveOverlay(?array $record): ?array
{
$languageId = $this->siteLanguage->getLanguageId();
......@@ -316,16 +312,9 @@ class PersistedPatternMapper implements PersistedMappableAspectInterface, Static
}
$pageRepository = $this->createPageRepository();
if ($this->tableName === 'pages') {
return $pageRepository->getPageOverlay($record, $languageId);
}
return $pageRepository
->getRecordOverlay($this->tableName, $record, $languageId) ?: null;
return $pageRepository->getLanguageOverlay($this->tableName, $record) ?: null;
}
/**
* @return PageRepository
*/
protected function createPageRepository(): PageRepository
{
$context = clone GeneralUtility::makeInstance(Context::class);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment