From a373a30102431e8d1a0e0188c7c2554236b05043 Mon Sep 17 00:00:00 2001 From: Benni Mack Date: Tue, 6 Jan 2026 16:02:35 +0100 Subject: [PATCH] [TASK] Add support for TYPO3 v14 --- Configuration/Icons.php | 8 ++++++++ composer.json | 2 +- ext_emconf.php | 2 +- ext_localconf.php | 18 +++++++++--------- 4 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 Configuration/Icons.php diff --git a/Configuration/Icons.php b/Configuration/Icons.php new file mode 100644 index 0000000..b003fa4 --- /dev/null +++ b/Configuration/Icons.php @@ -0,0 +1,8 @@ + [ + 'provider' => \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class, + 'source' => 'EXT:codeblock/Resources/Public/Icons/content-codeblock.svg', + ] +]; diff --git a/composer.json b/composer.json index d408804..19f57ee 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "require": { "scrivo/highlight.php": "^9.15", "php": "^7.4 || ~8.0", - "typo3/cms-core": "^10.4 || ^11.5 || ^12.0 || ^13.0" + "typo3/cms-core": "^10.4 || ^11.5 || ^12.0 || ^13.0 || ^14.0" }, "extra": { "typo3/cms": { diff --git a/ext_emconf.php b/ext_emconf.php index 03873b9..5e46417 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -12,7 +12,7 @@ 'version' => '2.1.0', 'constraints' => [ 'depends' => [ - 'typo3' => '10.4.0-13.99.99', + 'typo3' => '10.4.0-14.99.99', ], ], ]; diff --git a/ext_localconf.php b/ext_localconf.php index 1abc979..4b30cf3 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -6,14 +6,14 @@ if ((\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Information\Typo3Version::class))->getMajorVersion() < 12) { $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['codeblock'] = \B13\Codeblock\Hooks\CodeblockPreviewRenderer::class; - } - $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); - $iconRegistry->registerIcon( - 'content-codeblock', - \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class, - [ - 'source' => 'EXT:codeblock/Resources/Public/Icons/content-codeblock.svg', - ] - ); + $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); + $iconRegistry->registerIcon( + 'content-codeblock', + \TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class, + [ + 'source' => 'EXT:codeblock/Resources/Public/Icons/content-codeblock.svg', + ] + ); + } });