diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cb4d108..17fe6811 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Change Log All notable changes to this project will be documented in this file. +## [2.1.1] - 2023-02-08 +- Fixed: slick bundle compatibility + ## [2.1.0] - 2022-08-24 - Added: support for newer banner version and drop support for older ones ([#14]) - Changed: minumum contao version is now 4.9 diff --git a/composer.json b/composer.json index 62b58ada..07cbcf7b 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,9 @@ "heimrichhannot/contao-mediaquery": "^1.1", "heimrichhannot/contao-utils-bundle": "^2.218" }, + "conflict": { + "heimrichhannot/contao-slick-bundle": "<1.8.2" + }, "autoload": { "psr-4": { "HeimrichHannot\\BannerPlusBundle\\": "src/" diff --git a/src/EventListener/CompileSlickNewsListListener.php b/src/EventListener/CompileSlickNewsListListener.php index 310245de..abd3a906 100644 --- a/src/EventListener/CompileSlickNewsListListener.php +++ b/src/EventListener/CompileSlickNewsListListener.php @@ -15,7 +15,7 @@ use Contao\FrontendTemplate; use Contao\ModuleModel; use HeimrichHannot\BannerPlusBundle\Template\SlickBannerTemplate; -use HeimrichHannot\SlickBundle\ModuleSlickNewsList; +use HeimrichHannot\SlickBundle\Module\ModuleSlickNewsList; class CompileSlickNewsListListener { diff --git a/src/EventListener/InitializeSystemListener.php b/src/EventListener/InitializeSystemListener.php index 382a52c0..9bdc189c 100644 --- a/src/EventListener/InitializeSystemListener.php +++ b/src/EventListener/InitializeSystemListener.php @@ -13,6 +13,7 @@ use Contao\CoreBundle\ServiceAnnotation\Hook; +use HeimrichHannot\SlickBundle\HeimrichHannotContaoSlickBundle; use HeimrichHannot\UtilsBundle\Util\Utils; /** @@ -34,15 +35,12 @@ public function onInitializeSystem() { $this->addBackendAssets(); - if (class_exists('HeimrichHannot\SlickBundle\HeimrichHannotContaoSlickBundle')) { + if (class_exists(HeimrichHannotContaoSlickBundle::class)) { $GLOBALS['TL_HOOKS']['compileSlickNewsList']['huh_banner_plus'] = [CompileSlickNewsListListener::class, 'onCompileSlickNewsList']; } - if(isset($GLOBALS['TL_HOOKS']['replaceInsertTags']) && is_array($GLOBALS['TL_HOOKS']['replaceInsertTags'])) - { - foreach($GLOBALS['TL_HOOKS']['replaceInsertTags'] as $key => $arrConfig) - { - if($arrConfig[0] == 'BugBuster\Banner\BannerInsertTag') - { + if (isset($GLOBALS['TL_HOOKS']['replaceInsertTags']) && is_array($GLOBALS['TL_HOOKS']['replaceInsertTags'])) { + foreach ($GLOBALS['TL_HOOKS']['replaceInsertTags'] as $key => $arrConfig) { + if ($arrConfig[0] == 'BugBuster\Banner\BannerInsertTag') { $GLOBALS['TL_HOOKS']['replaceInsertTags'][$key] = [ReplaceInsertTagsListener::class, 'onReplaceInsertTags']; } } diff --git a/src/Template/SlickBannerTemplate.php b/src/Template/SlickBannerTemplate.php index 4c522f4e..d8022ee9 100644 --- a/src/Template/SlickBannerTemplate.php +++ b/src/Template/SlickBannerTemplate.php @@ -17,8 +17,8 @@ use Contao\Module; use Contao\ModuleModel; use HeimrichHannot\BannerPlusBundle\Helper\SliderDisplayFormatHelper; -use HeimrichHannot\SlickBundle\ModuleSlickEventList; -use HeimrichHannot\SlickBundle\ModuleSlickNewsList; +use HeimrichHannot\SlickBundle\Module\ModuleSlickEventList; +use HeimrichHannot\SlickBundle\Module\ModuleSlickNewsList; /** * Class SlickBannerGenerator