Browse code

Finalize module and also provide content element

Benjamin Roth authored on10/01/2023 21:52:20
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,25 @@
1
+<?php
2
+
3
+declare(strict_types=1);
4
+
5
+/*
6
+ * This file is part of modal bundle for Contao.
7
+ *
8
+ * (c) Benjamin Roth
9
+ *
10
+ * @license LGPL-3.0-or-later
11
+ */
12
+
13
+use vonRotenberg\ModalBundle\Controller\ContentElement\ModalElementController;
14
+
15
+$GLOBALS['TL_DCA']['tl_content']['palettes'][ModalElementController::TYPE] = '{type_legend},type;{modalconfig_legend},modal_configurations';
16
+
17
+
18
+$GLOBALS['TL_DCA']['tl_content']['fields']['modal_configurations'] = array
19
+(
20
+    'exclude'                  => true,
21
+    'inputType'                => 'select',
22
+    'foreignKey'               => 'tl_vr_modal.title',
23
+    'eval'                     => array('mandatory' => true, 'tl_class' => 'w50', 'includeBlankOption' => true, 'chosen' => true),
24
+    'sql'                      => 'int(10) unsigned NOT NULL default 0'
25
+);