From 3cb436fd2869e36670b26850ab4f5b6bd30214d5 Mon Sep 17 00:00:00 2001 From: Leo Feyer Date: Tue, 21 Jul 2020 15:43:35 +0200 Subject: [PATCH] Append to TL_MODELS instead of overwriting it --- calendar-bundle/src/Resources/contao/config/config.php | 8 +++----- comments-bundle/src/Resources/contao/config/config.php | 6 ++---- faq-bundle/src/Resources/contao/config/config.php | 6 ++---- news-bundle/src/Resources/contao/config/config.php | 8 +++----- .../src/Resources/contao/config/config.php | 10 ++++------ 5 files changed, 14 insertions(+), 24 deletions(-) diff --git a/calendar-bundle/src/Resources/contao/config/config.php b/calendar-bundle/src/Resources/contao/config/config.php index 9a100917a63..23c67035fda 100644 --- a/calendar-bundle/src/Resources/contao/config/config.php +++ b/calendar-bundle/src/Resources/contao/config/config.php @@ -57,8 +57,6 @@ $GLOBALS['TL_PERMISSIONS'][] = 'calendarfeedp'; // Models -$GLOBALS['TL_MODELS'] = array( - 'tl_calendar_events' => CalendarEventsModel::class, - 'tl_calendar_feed' => CalendarFeedModel::class, - 'tl_calendar' => CalendarModel::class -); +$GLOBALS['TL_MODELS']['tl_calendar_events'] = CalendarEventsModel::class; +$GLOBALS['TL_MODELS']['tl_calendar_feed'] = CalendarFeedModel::class; +$GLOBALS['TL_MODELS']['tl_calendar'] = CalendarModel::class; diff --git a/comments-bundle/src/Resources/contao/config/config.php b/comments-bundle/src/Resources/contao/config/config.php index 5e096fb7985..67a5a85ea95 100644 --- a/comments-bundle/src/Resources/contao/config/config.php +++ b/comments-bundle/src/Resources/contao/config/config.php @@ -31,7 +31,5 @@ $GLOBALS['TL_CRON']['daily']['purgeCommentSubscriptions'] = array(Comments::class, 'purgeSubscriptions'); // Models -$GLOBALS['TL_MODELS'] = array( - 'tl_comments' => CommentsModel::class, - 'tl_comments_notify' => CommentsNotifyModel::class -); +$GLOBALS['TL_MODELS']['tl_comments'] = CommentsModel::class; +$GLOBALS['TL_MODELS']['tl_comments_notify'] = CommentsNotifyModel::class; diff --git a/faq-bundle/src/Resources/contao/config/config.php b/faq-bundle/src/Resources/contao/config/config.php index 38fdc466ad9..fc2a1c27936 100644 --- a/faq-bundle/src/Resources/contao/config/config.php +++ b/faq-bundle/src/Resources/contao/config/config.php @@ -43,7 +43,5 @@ $GLOBALS['TL_PERMISSIONS'][] = 'faqp'; // Models -$GLOBALS['TL_MODELS'] = array( - 'tl_faq_category' => FaqCategoryModel::class, - 'tl_faq' => FaqModel::class -); +$GLOBALS['TL_MODELS']['tl_faq_category'] = FaqCategoryModel::class; +$GLOBALS['TL_MODELS']['tl_faq'] = FaqModel::class; diff --git a/news-bundle/src/Resources/contao/config/config.php b/news-bundle/src/Resources/contao/config/config.php index 4c59978d419..ad457f76943 100644 --- a/news-bundle/src/Resources/contao/config/config.php +++ b/news-bundle/src/Resources/contao/config/config.php @@ -57,8 +57,6 @@ $GLOBALS['TL_PERMISSIONS'][] = 'newsfeedp'; // Models -$GLOBALS['TL_MODELS'] = array( - 'tl_news_archive' => NewsArchiveModel::class, - 'tl_news_feed' => NewsFeedModel::class, - 'tl_news' => NewsModel::class -); +$GLOBALS['TL_MODELS']['tl_news_archive'] = NewsArchiveModel::class; +$GLOBALS['TL_MODELS']['tl_news_feed'] = NewsFeedModel::class; +$GLOBALS['TL_MODELS']['tl_news'] = NewsModel::class; diff --git a/newsletter-bundle/src/Resources/contao/config/config.php b/newsletter-bundle/src/Resources/contao/config/config.php index 19351477223..229ee46117b 100644 --- a/newsletter-bundle/src/Resources/contao/config/config.php +++ b/newsletter-bundle/src/Resources/contao/config/config.php @@ -50,9 +50,7 @@ $GLOBALS['TL_CRON']['daily']['purgeNewsletterSubscriptions'] = array(Newsletter::class, 'purgeSubscriptions'); // Models -$GLOBALS['TL_MODELS'] = array( - 'tl_newsletter_channel' => NewsletterChannelModel::class, - 'tl_newsletter_deny_list' => NewsletterDenyListModel::class, - 'tl_newsletter' => NewsletterModel::class, - 'tl_newsletter_recipients' => NewsletterRecipientsModel::class -); +$GLOBALS['TL_MODELS']['tl_newsletter_channel'] = NewsletterChannelModel::class; +$GLOBALS['TL_MODELS']['tl_newsletter_deny_list'] = NewsletterDenyListModel::class; +$GLOBALS['TL_MODELS']['tl_newsletter'] = NewsletterModel::class; +$GLOBALS['TL_MODELS']['tl_newsletter_recipients'] = NewsletterRecipientsModel::class;