[FEATURE] Make it configurable to remove the allowed tables in group element 98/49698/2
authorGeorg Ringer <georg.ringer@gmail.com>
Wed, 31 Aug 2016 20:00:17 +0000 (22:00 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Wed, 28 Sep 2016 11:46:08 +0000 (13:46 +0200)
By adding allowedTables to the TCA configuration option 'disable_controls'
the allowed tables can be hidden.

Resolves: #77668
Releases: master
Change-Id: I7122f8fbea26d379e3077982485116553bdfbc4e
Reviewed-on: https://review.typo3.org/49698
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php
typo3/sysext/backend/Classes/Form/Element/GroupElement.php
typo3/sysext/core/Documentation/Changelog/master/Feature-77668-HideTableListingBelowGroupElement.rst [new file with mode: 0644]

index 286cdcc..279d603 100644 (file)
@@ -677,7 +677,7 @@ abstract class AbstractFormElement extends AbstractNode
 
         // Allowed Tables
         $allowedTables = '';
-        if (is_array($params['allowedTables']) && !empty($params['allowedTables'])) {
+        if (is_array($params['allowedTables']) && !empty($params['allowedTables']) && !$params['hideAllowedTables']) {
             $allowedTables .= '<div class="help-block">';
             foreach ($params['allowedTables'] as $key => $item) {
                 if (is_array($item)) {
index b0d51ff..562610c 100644 (file)
@@ -104,6 +104,7 @@ class GroupElement extends AbstractFormElement
             'readOnly' => $disabled,
             'noBrowser' => $noList || isset($config['disable_controls']) && GeneralUtility::inList($config['disable_controls'], 'browser'),
             'noList' => $noList,
+            'hideAllowedTables' => GeneralUtility::inList($config['disable_controls'], 'allowedTables'),
         ];
 
         // Acting according to either "file" or "db" type:
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-77668-HideTableListingBelowGroupElement.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-77668-HideTableListingBelowGroupElement.rst
new file mode 100644 (file)
index 0000000..90be4af
--- /dev/null
@@ -0,0 +1,8 @@
+========================================================
+Feature: #77668 - Hide table listing below group element
+========================================================
+
+Description
+===========
+
+By adding ``allowedTables`` to the TCA configuration option ``disable_controls`` it is possible to hide the allowed tables.
\ No newline at end of file