[FEATURE] Migrate to LTS 7 icon factory 59/51159/2
authorStanislas Rolland <typo3@sjbr.ca>
Fri, 6 Jan 2017 06:53:49 +0000 (01:53 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Fri, 6 Jan 2017 06:55:21 +0000 (07:55 +0100)
Resolves: #79178
Change-Id: I85ee03e52dea411b68a1ffab7cdab330805bc386
Reviewed-on: https://review.typo3.org/51159
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
ChangeLog
Configuration/PageTS/modWizards.txt
Configuration/TCA/Overrides/tt_content.php
ext_localconf.php
ext_tables.php

index daca30d..c14b51c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2017-01-05  Stanislas Rolland  <typo3(arobas)sjbr.ca>\r
 \r
        * Resolves #79176: Missing renderType on TCA select definition\r
+       * Resolves #79178: Migrate to LTS 7 icon factory\r
 \r
 2016-05-22  Stanislas Rolland  <typo3(arobas)sjbr.ca>\r
 \r
index 56c981b..489f726 100644 (file)
@@ -1,5 +1,5 @@
 mod.wizards.newContentElement.wizardItems.special.elements.srlanguagemenu_languagemenu {
-       icon = EXT:sr_language_menu/Resources/Public/Images/language.png
+       iconIdentifier = tx-srlanguagemenu-language
        title = LLL:EXT:sr_language_menu/Resources/Private/Language/locallang.xlf:pi1_title
        description = LLL:EXT:sr_language_menu/Resources/Private/Language/locallang.xlf:pi1_plus_wiz_description
        tt_content_defValues {
index 0e118e6..fe8cbc8 100644 (file)
@@ -33,13 +33,9 @@ $tempColumns = array(
 
 $pluginSignature = strtolower(\TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase('sr_language_menu')) . '_languagemenu';
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('*', 'FILE:EXT:' . 'sr_language_menu' . '/Configuration/FlexForms/form.xml', $pluginSignature);
-$GLOBALS['TCA']['tt_content']['ctrl']['typeicons'][$pluginSignature] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('sr_language_menu') . 'Resources/Public/Images/language.png';
+$GLOBALS['TCA']['tt_content']['ctrl']['typeicon_classes'][$pluginSignature] = 'tx-srlanguagemenu-language';
 
-if (\TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getNumericTypo3Version()) >= 7000000) {
-       $coreLabelsSource = 'frontend/Resources/Private/Language/';
-} else {
-       $coreLabelsSource = 'cms/';
-}
+$coreLabelsSource = 'frontend/Resources/Private/Language/';
 $GLOBALS['TCA']['tt_content']['types'][$pluginSignature]['showitem'] = '--palette--;LLL:EXT:' . $coreLabelsSource . 'locallang_ttc.xml:palette.general;general';
 $GLOBALS['TCA']['tt_content']['types'][$pluginSignature]['showitem'] .= ', --palette--;LLL:EXT:' . $coreLabelsSource . 'locallang_ttc.xml:palette.headers;headers';
 $GLOBALS['TCA']['tt_content']['types'][$pluginSignature]['showitem'] .= ',--div--;LLL:EXT:sr_language_menu/Resources/Private/Language/locallang.xlf:settings.title, pi_flexform';
index 4c83f5c..0cc14f3 100644 (file)
@@ -21,4 +21,11 @@ defined('TYPO3_MODE') or die();
 if (TYPO3_MODE === 'BE') {
        // Include page TS configuration for new element wizard
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/Configuration/PageTS/modWizards.txt">');
+       // Register icon
+       $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
+       $iconRegistry->registerIcon(
+         'tx-srlanguagemenu-language',
+         \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
+         ['source' => 'EXT:' . $_EXTKEY . '/Resources/Public/Images/language.png']
+       );
 }
\ No newline at end of file
index 34d97d8..7184f0f 100644 (file)
@@ -11,7 +11,8 @@ if (TYPO3_MODE === 'BE') {
                // A unique name of the plugin in UpperCamelCase
                'LanguageMenu',
                // A title shown in the backend dropdown field
-               'LLL:EXT:sr_language_menu/Resources/Private/Language/locallang.xlf:pi1_title'
-               //'Language selection menu'
+               'LLL:EXT:sr_language_menu/Resources/Private/Language/locallang.xlf:pi1_title',
+               // Icon
+               'tx-srlanguagemenu-language'
        );
-}
+}
\ No newline at end of file