[TASK] Drop TCA ctrl typeicons 96/43196/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 11 Sep 2015 13:08:09 +0000 (15:08 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 11 Sep 2015 14:13:23 +0000 (16:13 +0200)
The typeicons key in TCA ctrl section was deprecated for a
long time already and marked as "use typeicon_classes" instead
within the documentation.

The patch drops last usages in core TCA - they all overlap with
typeicon_classes already and drop the handling.

Resolves: #69699
Releases: master
Change-Id: I5ae986d0238f2eb561dcd35b32ea41f455271854
Reviewed-on: http://review.typo3.org/43196
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Classes/Sprite/AbstractSpriteHandler.php
typo3/sysext/backend/Classes/Utility/IconUtility.php
typo3/sysext/compatibility6/Configuration/TCA/Overrides/tt_content.php
typo3/sysext/core/Configuration/TCA/be_users.php
typo3/sysext/core/Configuration/TCA/pages.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-69699-TcaCtrlTypeicons.rst [new file with mode: 0644]
typo3/sysext/css_styled_content/Configuration/TCA/Overrides/tt_content.php
typo3/sysext/form/Configuration/TCA/Overrides/tt_content.php
typo3/sysext/frontend/Configuration/TCA/sys_template.php
typo3/sysext/frontend/Configuration/TCA/tt_content.php
typo3/sysext/mediace/Configuration/TCA/Overrides/tt_content.php

index 8ec4eb0..a9ede30 100644 (file)
@@ -155,18 +155,6 @@ abstract class AbstractSpriteHandler implements SpriteIconGeneratorInterface {
 
                                        $resultArray['tcarecords-' . $tableName . '-default'] = $icon;
                                }
-                               // If records types are available, register them
-                               if (isset($tcaCtrl['typeicon_column']) && is_array($tcaCtrl['typeicons'])) {
-                                       foreach ($tcaCtrl['typeicons'] as $type => $icon) {
-                                               // In CSS we need a path relative to the css file
-                                               // [TCA][ctrl][iconfile] defines icons without path info to reside in gfx/i/
-                                               if (strpos($icon, '/') === FALSE) {
-                                                       $icon = $skinPath . 'gfx/i/' . $icon;
-                                               }
-                                               $icon = GeneralUtility::resolveBackPath($icon);
-                                               $resultArray['tcarecords-' . $tableName . '-' . $type] = $icon;
-                                       }
-                               }
                        }
                }
                return $resultArray;
index 66e119f..4accfd0 100644 (file)
@@ -157,9 +157,7 @@ class IconUtility {
                                $iconfile = $GLOBALS['PAGES_TYPES']['default']['icon'];
                        }
                } else {
-                       if (!($iconfile = $GLOBALS['TCA'][$table]['ctrl']['typeicons'][$row[$GLOBALS['TCA'][$table]['ctrl']['typeicon_column']]])) {
-                               $iconfile = $GLOBALS['TCA'][$table]['ctrl']['iconfile'] ?: $table . '.gif';
-                       }
+                       $iconfile = $GLOBALS['TCA'][$table]['ctrl']['iconfile'] ?: $table . '.gif';
                }
                // Setting path of iconfile if not already set. Default is "gfx/i/"
                if (!strstr($iconfile, '/')) {
index d2d15af..0f7b8dc 100644 (file)
@@ -290,7 +290,6 @@ if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('css_styled_co
  * CType "search"
  */
 $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['search'] = 'mimetypes-x-content-form-search';
-$GLOBALS['TCA']['tt_content']['ctrl']['typeicons']['search'] = 'tt_content_search.gif';
 $GLOBALS['TCA']['tt_content']['types']['search'] = array(
        'showitem' => '--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
                        --palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.header;header,
@@ -344,7 +343,6 @@ if ($groupFound && $groupPosition) {
  */
 if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('form')) {
        $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['mailform'] = 'mimetypes-x-content-form';
-       $GLOBALS['TCA']['tt_content']['ctrl']['typeicons']['mailform'] = 'tt_content_form.gif';
        $GLOBALS['TCA']['tt_content']['columns']['bodytext']['config']['wizards']['forms'] = array(
                'notNewRecords' => 1,
                'enableByTypeConfig' => 1,
index a0aa60f..b6ee292 100644 (file)
@@ -18,10 +18,6 @@ return array(
                ),
                'type' => 'admin',
                'typeicon_column' => 'admin',
-               'typeicons' => array(
-                       '0' => 'be_users.gif',
-                       '1' => 'be_users_admin.gif'
-               ),
                'typeicon_classes' => array(
                        '0' => 'status-user-backend',
                        '1' => 'status-user-admin',
index be7a2bf..9f97096 100644 (file)
@@ -56,11 +56,6 @@ return array(
                        'page-contentFromPid-hideinmenu' => 'apps-pagetree-page-content-from-page-hideinmenu',
                        'default' => 'apps-pagetree-page-default'
                ),
-               'typeicons' => array(
-                       '1' => 'pages.gif',
-                       '254' => 'sysf.gif',
-                       '255' => 'recycler.gif'
-               ),
                'searchFields' => 'title,alias,nav_title,subtitle,url,keywords,description,abstract,author,author_email'
        ),
        'interface' => array(
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-69699-TcaCtrlTypeicons.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-69699-TcaCtrlTypeicons.rst
new file mode 100644 (file)
index 0000000..047177a
--- /dev/null
@@ -0,0 +1,27 @@
+=============================================
+Breaking: #69699 - TCA ctrl typeicons removed
+=============================================
+
+Description
+===========
+
+The ``TCA['ctrl']['typeicons']`` key has been removed.
+
+
+Impact
+======
+
+If still used, a fallback default icon may be displayed instead.
+
+
+Affected Installations
+======================
+
+Searching for ``typeicons`` keyword should reveal extensions using this functionality.
+
+
+Migration
+=========
+
+Until further works on the icon API have been finished, ``TCA['ctrl']['typeicon_classes']``
+should be used as documented in the TCA reference.
index ba86f86..573d399 100644 (file)
@@ -365,14 +365,6 @@ $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes'] = array_merge(
                'text' => 'mimetypes-x-content-text'
        )
 );
-$GLOBALS['TCA']['tt_content']['ctrl']['typeicons'] = array_merge(
-       $GLOBALS['TCA']['tt_content']['ctrl']['typeicons'],
-       array(
-               'textpic' => 'tt_content_textpic.gif',
-               'image' => 'tt_content_image.gif',
-               'text' => 'tt_content.gif'
-       )
-);
 array_splice(
        $GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'],
        2,
index c8953ba..7e3e8d9 100644 (file)
@@ -3,7 +3,6 @@ defined('TYPO3_MODE') or die();
 
 // add an CType element "mailform"
 $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['mailform'] = 'mimetypes-x-content-form';
-$GLOBALS['TCA']['tt_content']['ctrl']['typeicons']['mailform'] = 'tt_content_form.gif';
 
 // check if there is already a forms tab and add the item after that, otherwise
 // add the tab item as well
index 0445a67..fda1dcf 100644 (file)
@@ -25,9 +25,6 @@ return array(
                        'default' => 'mimetypes-x-content-template-extension',
                        '1' => 'mimetypes-x-content-template'
                ),
-               'typeicons' => array(
-                       '0' => 'template_add.gif'
-               ),
                'searchFields' => 'title,constants,config'
        ),
        'interface' => array(
index 53affe7..da17791 100644 (file)
@@ -44,19 +44,6 @@ return array(
                        'html' => 'mimetypes-x-content-html',
                        'default' => 'mimetypes-x-content-text'
                ),
-               'typeicons' => array(
-                       'header' => 'tt_content_header.gif',
-                       'bullets' => 'tt_content_bullets.gif',
-                       'table' => 'tt_content_table.gif',
-                       'uploads' => 'tt_content_uploads.gif',
-                       'menu' => 'tt_content_menu.gif',
-                       'list' => 'tt_content_list.gif',
-                       'login' => 'tt_content_login.gif',
-                       'shortcut' => 'tt_content_shortcut.gif',
-                       'script' => 'tt_content_script.gif',
-                       'div' => 'tt_content_div.gif',
-                       'html' => 'tt_content_html.gif'
-               ),
                'thumbnail' => 'image',
                'requestUpdate' => 'list_type,menu_type',
                'searchFields' => 'header,header_link,subheader,bodytext,pi_flexform'
index 7ee32f6..9a31ab3 100644 (file)
@@ -6,8 +6,6 @@ defined('TYPO3_MODE') or die();
  */
 $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['multimedia'] = 'mimetypes-x-content-multimedia';
 $GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes']['media'] = 'mimetypes-x-content-multimedia';
-$GLOBALS['TCA']['tt_content']['ctrl']['typeicons']['multimedia'] = 'tt_content_mm.gif';
-$GLOBALS['TCA']['tt_content']['ctrl']['typeicons']['media'] = 'tt_content_mm.gif';
 
 
 // Register new CType in item list just before "menu"