|
9 | 9 | */
|
10 | 10 |
|
11 | 11 | use FluidTYPO3\Vhs\Proxy\DoctrineQueryProxy;
|
| 12 | +use FluidTYPO3\Vhs\Proxy\SiteFinderProxy; |
12 | 13 | use FluidTYPO3\Vhs\Traits\ArrayConsumingViewHelperTrait;
|
13 | 14 | use FluidTYPO3\Vhs\Traits\TagViewHelperCompatibility;
|
14 | 15 | use FluidTYPO3\Vhs\Utility\ContentObjectFetcher;
|
|
19 | 20 | use TYPO3\CMS\Core\Imaging\Icon;
|
20 | 21 | use TYPO3\CMS\Core\Imaging\IconFactory;
|
21 | 22 | use TYPO3\CMS\Core\Site\Site;
|
22 |
| -use TYPO3\CMS\Core\Site\SiteFinder; |
23 | 23 | use TYPO3\CMS\Core\Utility\GeneralUtility;
|
24 | 24 | use TYPO3\CMS\Core\Utility\VersionNumberUtility;
|
25 | 25 | use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
@@ -152,12 +152,10 @@ public function render()
|
152 | 152 | $this->cObj = $contentObject;
|
153 | 153 | $this->tagName = is_scalar($this->arguments['tagName']) ? (string) $this->arguments['tagName'] : 'ul';
|
154 | 154 | $this->tag->setTagName($this->tagName);
|
155 |
| - |
156 |
| - if (class_exists(SiteFinder::class)) { |
157 |
| - $this->site = $this->getSite(); |
158 |
| - $this->defaultLangUid = $this->site->getDefaultLanguage()->getLanguageId(); |
159 |
| - } |
| 155 | + $this->site = $this->getSite(); |
| 156 | + $this->defaultLangUid = $this->site->getDefaultLanguage()->getLanguageId(); |
160 | 157 | $this->languageMenu = $this->parseLanguageMenu();
|
| 158 | + |
161 | 159 | /** @var string $as */
|
162 | 160 | $as = $this->arguments['as'];
|
163 | 161 | $this->renderingContext->getVariableProvider()->add($as, $this->languageMenu);
|
@@ -505,8 +503,8 @@ protected function getPageUid(): int
|
505 | 503 | */
|
506 | 504 | protected function getSite()
|
507 | 505 | {
|
508 |
| - /** @var SiteFinder $siteFinder */ |
509 |
| - $siteFinder = GeneralUtility::makeInstance(SiteFinder::class); |
| 506 | + /** @var SiteFinderProxy $siteFinder */ |
| 507 | + $siteFinder = GeneralUtility::makeInstance(SiteFinderProxy::class); |
510 | 508 | return $siteFinder->getSiteByPageId($this->getPageUid());
|
511 | 509 | }
|
512 | 510 |
|
|
0 commit comments