[TASK] Start compatibility for TYPO3 11

This commit is contained in:
Philipp Dieter 2024-08-29 18:16:52 +02:00
parent 94296d4a4d
commit fb54d608a6
6 changed files with 33 additions and 19 deletions

View File

@ -182,7 +182,7 @@ class ActionController extends BaseController
*/ */
public function injectPropertyMapper( public function injectPropertyMapper(
PropertyMapper $propertyMapper PropertyMapper $propertyMapper
) { ): void {
$this->propertyMapper = $propertyMapper; $this->propertyMapper = $propertyMapper;
} }

View File

@ -102,11 +102,17 @@ trait DependencyInjectionTrait
$frameworkConfiguration['persistence']['storagePid'] $frameworkConfiguration['persistence']['storagePid']
) )
); );
if (version_compare(TYPO3_branch, '10.0', '>=')) {
$this->reflectionService = GeneralUtility::makeInstance(
ReflectionService::class
);
} else {
$this->reflectionService = GeneralUtility::makeInstance( $this->reflectionService = GeneralUtility::makeInstance(
ReflectionService::class, GeneralUtility::makeInstance( ReflectionService::class, GeneralUtility::makeInstance(
CacheManager::class CacheManager::class
) )
); );
}
$classInfo = $this->reflectionService->getClassSchema( $classInfo = $this->reflectionService->getClassSchema(
get_class($this) get_class($this)
); );

View File

@ -66,7 +66,7 @@ class TranslationViewHelper extends AbstractViewHelper
$translation = LocalizationUtility::translate( $translation = LocalizationUtility::translate(
$arguments['key'], $arguments['key'],
$arguments['extensionKey'], $arguments['extensionKey'],
$arguments['arguments'] (array) $arguments['arguments']
); );
if ($translation) { if ($translation) {
return $translation; return $translation;

View File

@ -1,6 +1,3 @@
#options.pageTree.showPageIdWithTitle = 1
options.pageTree.showNavTitle = 1
options { options {
folderTree { folderTree {
uploadFieldsInLinkBrowser = 0 uploadFieldsInLinkBrowser = 0

View File

@ -9,7 +9,7 @@
} }
], ],
"require": { "require": {
"typo3/cms-core": "8.7.0 - 10.99.99", "typo3/cms-core": "8.7.0 - 11.99.99",
"sarhan/php-flatten": "^4.0" "sarhan/php-flatten": "^4.0"
}, },
"autoload": { "autoload": {

View File

@ -39,15 +39,26 @@ call_user_func(
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'][] = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'][] =
\Cjel\TemplatesAide\Hooks\WizardItems::class; \Cjel\TemplatesAide\Hooks\WizardItems::class;
if (version_compare(TYPO3_branch, '10.0', '>=')) {
if (\TYPO3\CMS\Core\Core\Environment::getContext()->isDevelopment()) {
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
'EXT:templates_aide/Resources/Public/Css/backend/dev';
}
if(\TYPO3\CMS\Core\Core\Environment::getContext()->__toString() === 'Production/Stage') {
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
'EXT:templates_aide/Resources/Public/Css/backend/production-stage';
}
} else {
if (\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->isDevelopment()) { if (\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->isDevelopment()) {
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] = $GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
'EXT:templates_aide/Resources/Public/Css/backend/dev'; 'EXT:templates_aide/Resources/Public/Css/backend/dev';
} }
if(\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->__toString() === 'Production/Stage') { if(\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->__toString() === 'Production/Stage') {
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] = $GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] =
'EXT:templates_aide/Resources/Public/Css/backend/production-stage'; 'EXT:templates_aide/Resources/Public/Css/backend/production-stage';
} }
}
$GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['templates_aide_default'] = $GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['templates_aide_default'] =
'EXT:templates_aide/Resources/Public/Css/backend/default'; 'EXT:templates_aide/Resources/Public/Css/backend/default';