Commit 617e6c43 authored by Georg Ringer's avatar Georg Ringer Committed by Wouter Wolters
Browse files

[FEATURE] Make it configurable to remove the allowed tables in group element

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: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Frans Saris's avatarFrans Saris <franssaris@gmail.com>
Tested-by: Frans Saris's avatarFrans Saris <franssaris@gmail.com>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
parent 1f61ffe3
......@@ -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)) {
......
......@@ -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:
......
========================================================
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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment