Skip to content

Commit

Permalink
[TASK] Removed Extbase LocalizationUtility from Backend Preview
Browse files Browse the repository at this point in the history
  • Loading branch information
hojalatheef committed Jan 9, 2025
1 parent 02a3adf commit bd2ee0a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Classes/Backend/Preview/Yellowpages2PluginPreview.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

use TYPO3\CMS\Backend\Preview\StandardContentPreviewRenderer;
use TYPO3\CMS\Backend\View\BackendLayout\Grid\GridColumnItem;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Service\FlexFormService;
use TYPO3\CMS\Core\View\ViewFactoryData;
use TYPO3\CMS\Core\View\ViewFactoryInterface;
use TYPO3\CMS\Core\View\ViewInterface;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;

/**
* Add plugin preview for EXT:yellowpages2
Expand Down Expand Up @@ -88,7 +88,7 @@ protected function addPluginName(ViewInterface $view, array $ttContentRecord): v

$view->assign(
'pluginName',
LocalizationUtility::translate('LLL:EXT:yellowpages2/Resources/Private/Language/locallang_db.xlf:' . $langKey),
$this->getLanguageService()->sL('LLL:EXT:yellowpages2/Resources/Private/Language/locallang_db.xlf:' . $langKey),
);
}

Expand All @@ -105,4 +105,9 @@ protected function getPiFlexformData(array $ttContentRecord): array

return $data;
}

protected function getLanguageService(): LanguageService
{
return $GLOBALS['LANG'];
}
}

0 comments on commit bd2ee0a

Please sign in to comment.