[FEATURE] Allow asterisk for hideTables TSconfig 35/47535/4
authorBenni Mack <benni@typo3.org>
Thu, 7 Apr 2016 14:55:53 +0000 (16:55 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 8 Apr 2016 10:17:54 +0000 (12:17 +0200)
Allow pageTSconfig option to hide all tables at once.

Example:
mod.web_list {
hideTables = *
table.pages.hideTable = 0
}

Resolves: #27471
Releases: master
Change-Id: I9d64b63e09efcafe20ef614c16cf3f523d6d323c
Reviewed-on: https://review.typo3.org/47535
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/core/Documentation/Changelog/master/Feature-27471-AllowAsteriskForHideTables.rst [new file with mode: 0644]
typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-27471-AllowAsteriskForHideTables.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-27471-AllowAsteriskForHideTables.rst
new file mode 100644 (file)
index 0000000..b16cab9
--- /dev/null
@@ -0,0 +1,18 @@
+===============================================
+Feature: #27471 - Allow asterisk for hideTables
+===============================================
+
+Description
+===========
+
+It is now possible to hide all tables from list view via PageTS-Config.
+
+You want to show only a specific table, you can hide all tables and unhide only the specific one.
+
+.. code-block:: typoscript
+
+   mod.web_list {
+      hideTables = *
+      table.tx_cal_event.hideTable = 0
+   }
+
index 05b71fc..5c98be4 100644 (file)
@@ -454,7 +454,7 @@ class AbstractDatabaseRecordList extends AbstractRecordList
             if (!$hideTable) {
                 // Don't show table if hidden by TCA ctrl section
                 // Don't show table if hidden by pageTSconfig mod.web_list.hideTables
-                $hideTable = $hideTable || !empty($GLOBALS['TCA'][$tableName]['ctrl']['hideTable']) || in_array($tableName, $hideTablesArray, true);
+                $hideTable = $hideTable || !empty($GLOBALS['TCA'][$tableName]['ctrl']['hideTable']) || in_array($tableName, $hideTablesArray, true) || in_array('*', $hideTablesArray, true);
                 // Override previous selection if table is enabled or hidden by TSconfig TCA override mod.web_list.table
                 if (isset($this->tableTSconfigOverTCA[$tableName . '.']['hideTable'])) {
                     $hideTable = (bool)$this->tableTSconfigOverTCA[$tableName . '.']['hideTable'];