Skip to content
Snippets Groups Projects
Commit 54b2c0b2 authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[BUGFIX] Compatibility fix for the LanguageService namespace

parent 9187c52e
No related branches found
No related tags found
2 merge requests!13Feature remove sg news ajax plugin,!8Feature upgrade to9 lts
......@@ -32,9 +32,9 @@ use TYPO3\CMS\Backend\Clipboard\Clipboard;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Page\PageRenderer;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
use TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList;
......@@ -77,7 +77,12 @@ class ControlViewHelper extends AbstractViewHelper {
$pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
$pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/AjaxDataHandler');
$pageRenderer->addInlineLanguageLabelFile('EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf');
$languageService = GeneralUtility::makeInstance(LanguageService::class);
if (version_compare(VersionNumberUtility::getCurrentTypo3Version(), '9.0.0', '<')) {
$languageService = GeneralUtility::makeInstance(\TYPO3\CMS\Lang\LanguageService::class);
} else {
$languageService = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Localization\LanguageService::class);
}
$languageService->includeLLFile('EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf');
$databaseRecordList->currentTable = $sortingData;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment