-
Notifications
You must be signed in to change notification settings - Fork 4
Compatibility with Contao 5 #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 6 commits
a670c4c
52bfd5c
ca67116
8af2997
45cf9c3
638fd49
effa0be
4e52899
1a64172
fd7467d
724229e
46c6be0
d2f605c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ | |
| */ | ||
|
|
||
| use Contao\DataContainer; | ||
| use Contao\System; | ||
| use HeimrichHannot\Subcolumns\SubcolumnTypes; | ||
|
|
||
| $GLOBALS['TL_DCA']['tl_content']['fields']['sc_name'] = array | ||
|
|
@@ -138,8 +139,31 @@ | |
| /** | ||
| * Operations | ||
| **/ | ||
| $arrModules = $this->Config->getActiveModules(); | ||
| if(!in_array('ce-access',$arrModules)) | ||
| $getActiveBundles = function () { | ||
| $bundles = array_keys(System::getContainer()->getParameter('kernel.bundles')); | ||
|
|
||
| $legacy = [ | ||
| 'ContaoCoreBundle' => 'core', | ||
| 'ContaoCalendarBundle' => 'calendar', | ||
| 'ContaoCommentsBundle' => 'comments', | ||
| 'ContaoFaqBundle' => 'faq', | ||
| 'ContaoListingBundle' => 'listing', | ||
| 'ContaoNewsBundle' => 'news', | ||
| 'ContaoNewsletterBundle' => 'newsletter' | ||
| ]; | ||
|
|
||
| foreach ($legacy as $bundleName => $module) | ||
| { | ||
| if (\in_array($bundleName, $bundles)) | ||
| { | ||
| $bundles[] = $module; | ||
| } | ||
| } | ||
|
|
||
| return $bundles; | ||
| }; | ||
|
|
||
| if (!in_array('ce-access', $getActiveBundles())) | ||
|
||
| { | ||
| $GLOBALS['TL_DCA']['tl_content']['list']['operations']['edit']['button_callback'] = array('tl_content_sc','showEditOperation'); | ||
| $GLOBALS['TL_DCA']['tl_content']['list']['operations']['copy']['button_callback'] = array('tl_content_sc','showCopyOperation'); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Denke, dass wir das legacy mapping nicht mehr brauchen? 🤷♂️