Browse code

Modernize and adjust code to Contao 5

Benjamin Roth authored on26/10/2023 15:21:49
Showing1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,33 +0,0 @@
1
-<?php
2
-
3
-/*
4
- * This file is part of eSales Media ContentHelperBundle
5
- *
6
- * (c) Benjamin Roth
7
- *
8
- * @license proprietary
9
- */
10
-
11
-/*
12
- * Modify palettes
13
- */
14
-foreach ($GLOBALS['TL_DCA']['tl_article']['palettes'] as $key => $palette)
15
-{
16
-    if ($key != '__selector__')
17
-    {
18
-        \Contao\CoreBundle\DataContainer\PaletteManipulator::create()->addField('hideInArticleList','teaser',\Contao\CoreBundle\DataContainer\PaletteManipulator::POSITION_AFTER)->applyToPalette($key,'tl_article');
19
-    }
20
-}
21
-
22
-/*
23
- * Add fields
24
- */
25
-
26
-$GLOBALS['TL_DCA']['tl_article']['fields']['hideInArticleList'] = array
27
-(
28
-    'label'                   => &$GLOBALS['TL_LANG']['tl_article']['hideInArticleList'],
29
-    'exclude'                 => true,
30
-    'inputType'               => 'checkbox',
31
-    'eval'                    => array('tl_class'=>'w50'),
32
-    'sql'                     => "char(1) NOT NULL default ''"
33
-);
Browse code

Add possibility to hide article in article list module

Benjamin Roth authored on02/07/2019 15:00:41
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,33 @@
1
+<?php
2
+
3
+/*
4
+ * This file is part of eSales Media ContentHelperBundle
5
+ *
6
+ * (c) Benjamin Roth
7
+ *
8
+ * @license proprietary
9
+ */
10
+
11
+/*
12
+ * Modify palettes
13
+ */
14
+foreach ($GLOBALS['TL_DCA']['tl_article']['palettes'] as $key => $palette)
15
+{
16
+    if ($key != '__selector__')
17
+    {
18
+        \Contao\CoreBundle\DataContainer\PaletteManipulator::create()->addField('hideInArticleList','teaser',\Contao\CoreBundle\DataContainer\PaletteManipulator::POSITION_AFTER)->applyToPalette($key,'tl_article');
19
+    }
20
+}
21
+
22
+/*
23
+ * Add fields
24
+ */
25
+
26
+$GLOBALS['TL_DCA']['tl_article']['fields']['hideInArticleList'] = array
27
+(
28
+    'label'                   => &$GLOBALS['TL_LANG']['tl_article']['hideInArticleList'],
29
+    'exclude'                 => true,
30
+    'inputType'               => 'checkbox',
31
+    'eval'                    => array('tl_class'=>'w50'),
32
+    'sql'                     => "char(1) NOT NULL default ''"
33
+);