Skip to content
Snippets Groups Projects
Commit bb3fd359 authored by Susanne Moog's avatar Susanne Moog Committed by Wouter Wolters
Browse files

[BUGFIX] Removed extension specific code in abstract module

The admin panels AbstractModule class is meant to be extended
by extension authors and should not contain code specific to
the core adminpanel extension. The specific code has been removed.

Resolves: #85677
Releases: master
Change-Id: I6ea835954a642b456a231c7952231a3fae0cc5b4
Reviewed-on: https://review.typo3.org/57719


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
parent 1c39e173
Branches
Tags
......@@ -30,10 +30,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
abstract class AbstractModule implements AdminPanelModuleInterface
{
/**
* @var string
*/
protected $extResources = 'EXT:adminpanel/Resources/Private';
/**
* @var \TYPO3\CMS\Adminpanel\Modules\AdminPanelSubModuleInterface[]
......
......@@ -38,9 +38,9 @@ class CacheModule extends AbstractModule
public function getSettings(): string
{
$view = GeneralUtility::makeInstance(StandaloneView::class);
$templateNameAndPath = $this->extResources . '/Templates/Modules/Settings/Cache.html';
$templateNameAndPath = 'EXT:adminpanel/Resources/Private/Templates/Modules/Settings/Cache.html';
$view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName($templateNameAndPath));
$view->setPartialRootPaths([$this->extResources . '/Partials']);
$view->setPartialRootPaths(['EXT:adminpanel/Resources/Private/Partials']);
$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
$feCacheClear = $this->getBackendUser()->isAdmin() || $this->getBackendUser()->getTSConfig()['options.']['clearCache.']['pages'];
......@@ -76,7 +76,7 @@ class CacheModule extends AbstractModule
*/
public function getLabel(): string
{
$locallangFileAndPath = 'LLL:' . $this->extResources . '/Language/locallang_cache.xlf:module.label';
$locallangFileAndPath = 'LLL:EXT:adminpanel/Resources/Private/Language/locallang_cache.xlf:module.label';
return $this->getLanguageService()->sL($locallangFileAndPath);
}
......
......@@ -39,9 +39,9 @@ class EditModule extends AbstractModule
$editToolbarService = GeneralUtility::makeInstance(EditToolbarService::class);
$toolbar = $editToolbarService->createToolbar();
$view = GeneralUtility::makeInstance(StandaloneView::class);
$templateNameAndPath = $this->extResources . '/Templates/Modules/Settings/Edit.html';
$templateNameAndPath = 'EXT:adminpanel/Resources/Private/Templates/Modules/Settings/Edit.html';
$view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName($templateNameAndPath));
$view->setPartialRootPaths([$this->extResources . '/Partials']);
$view->setPartialRootPaths(['EXT:adminpanel/Resources/Private/Partials']);
$view->assignMultiple(
[
'feEdit' => ExtensionManagementUtility::isLoaded('feedit'),
......@@ -99,7 +99,7 @@ class EditModule extends AbstractModule
*/
public function getLabel(): string
{
$locallangFileAndPath = 'LLL:' . $this->extResources . '/Language/locallang_edit.xlf:module.label';
$locallangFileAndPath = 'LLL:EXT:adminpanel/Resources/Private/Language/locallang_edit.xlf:module.label';
return $this->getLanguageService()->sL($locallangFileAndPath);
}
......
......@@ -62,7 +62,7 @@ class PreviewModule extends AbstractModule
public function getLabel(): string
{
return $this->getLanguageService()->sL(
'LLL:' . $this->extResources . '/Language/locallang_preview.xlf:module.label'
'LLL:EXT:adminpanel/Resources/Private/Language/locallang_preview.xlf:module.label'
);
}
......@@ -92,9 +92,9 @@ class PreviewModule extends AbstractModule
public function getSettings(): string
{
$view = GeneralUtility::makeInstance(StandaloneView::class);
$templateNameAndPath = $this->extResources . '/Templates/Modules/Settings/Preview.html';
$templateNameAndPath = 'EXT:adminpanel/Resources/Private/Templates/Modules/Settings/Preview.html';
$view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName($templateNameAndPath));
$view->setPartialRootPaths([$this->extResources . '/Partials']);
$view->setPartialRootPaths(['EXT:adminpanel/Resources/Private/Partials']);
$frontendGroupsRepository = GeneralUtility::makeInstance(FrontendGroupsRepository::class);
......
......@@ -52,7 +52,7 @@ class TypoScriptWaterfall extends AbstractSubModule
public function getLabel(): string
{
return $this->getLanguageService()->sL(
'LLL:' . 'EXT:adminpanel/Resources/Private/Language/locallang_tsdebug.xlf:sub.waterfall.label'
'LLL:EXT:adminpanel/Resources/Private/Language/locallang_tsdebug.xlf:sub.waterfall.label'
);
}
......
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