diff --git a/Classes/Controller/ActionController.php b/Classes/Controller/ActionController.php index cffa6ea..02797b6 100644 --- a/Classes/Controller/ActionController.php +++ b/Classes/Controller/ActionController.php @@ -182,7 +182,7 @@ class ActionController extends BaseController */ public function injectPropertyMapper( PropertyMapper $propertyMapper - ) { + ): void { $this->propertyMapper = $propertyMapper; } diff --git a/Classes/Traits/DependencyInjectionTrait.php b/Classes/Traits/DependencyInjectionTrait.php index 039f1c3..e5cd10c 100644 --- a/Classes/Traits/DependencyInjectionTrait.php +++ b/Classes/Traits/DependencyInjectionTrait.php @@ -102,11 +102,17 @@ trait DependencyInjectionTrait $frameworkConfiguration['persistence']['storagePid'] ) ); - $this->reflectionService = GeneralUtility::makeInstance( - ReflectionService::class, GeneralUtility::makeInstance( - CacheManager::class - ) - ); + if (version_compare(TYPO3_branch, '10.0', '>=')) { + $this->reflectionService = GeneralUtility::makeInstance( + ReflectionService::class + ); + } else { + $this->reflectionService = GeneralUtility::makeInstance( + ReflectionService::class, GeneralUtility::makeInstance( + CacheManager::class + ) + ); + } $classInfo = $this->reflectionService->getClassSchema( get_class($this) ); diff --git a/Classes/ViewHelpers/TranslationViewHelper.php b/Classes/ViewHelpers/TranslationViewHelper.php index 03aa02c..dd34c4c 100644 --- a/Classes/ViewHelpers/TranslationViewHelper.php +++ b/Classes/ViewHelpers/TranslationViewHelper.php @@ -66,7 +66,7 @@ class TranslationViewHelper extends AbstractViewHelper $translation = LocalizationUtility::translate( $arguments['key'], $arguments['extensionKey'], - $arguments['arguments'] + (array) $arguments['arguments'] ); if ($translation) { return $translation; diff --git a/Resources/Private/UserTSConfig/default.ts b/Resources/Private/UserTSConfig/default.ts index c117da8..aca9b42 100644 --- a/Resources/Private/UserTSConfig/default.ts +++ b/Resources/Private/UserTSConfig/default.ts @@ -1,6 +1,3 @@ -#options.pageTree.showPageIdWithTitle = 1 -options.pageTree.showNavTitle = 1 - options { folderTree { uploadFieldsInLinkBrowser = 0 diff --git a/composer.json b/composer.json index 0134a05..7eb349a 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ } ], "require": { - "typo3/cms-core": "8.7.0 - 10.99.99", + "typo3/cms-core": "8.7.0 - 11.99.99", "sarhan/php-flatten": "^4.0" }, "autoload": { diff --git a/ext_tables.php b/ext_tables.php index 48b4841..ea14cb8 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -39,14 +39,25 @@ call_user_func( $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'][] = \Cjel\TemplatesAide\Hooks\WizardItems::class; - if(\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->isDevelopment()) { - $GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] = - 'EXT:templates_aide/Resources/Public/Css/backend/dev'; - } - if(\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->__toString() === 'Production/Stage') { - $GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] = - 'EXT:templates_aide/Resources/Public/Css/backend/production-stage'; + 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()) { + $GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] = + 'EXT:templates_aide/Resources/Public/Css/backend/dev'; + } + if(\TYPO3\CMS\Core\Utility\GeneralUtility::getApplicationContext()->__toString() === 'Production/Stage') { + $GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['dev'] = + 'EXT:templates_aide/Resources/Public/Css/backend/production-stage'; + } } $GLOBALS['TBE_STYLES']['skins']['backend']['stylesheetDirectories']['templates_aide_default'] = @@ -83,4 +94,4 @@ $GLOBALS['TYPO3_USER_SETTINGS']['showitem'] = str_replace( 'recursiveDelete', 'recursiveDelete,disableDragModal', $GLOBALS['TYPO3_USER_SETTINGS']['showitem'], -); \ No newline at end of file +);