Commit d0fc6c2f authored by Wouter Wolters's avatar Wouter Wolters Committed by Benni Mack
Browse files

[TASK] Implement EXT: resolving for iconfile option

Resolves: #68469
Releases: master
Change-Id: Idde90e50f3effcca81b65d13b0dc098a7dea2d03
Reviewed-on: http://review.typo3.org/41824


Reviewed-by: default avatarSusanne Moog <typo3@susannemoog.de>
Tested-by: default avatarSusanne Moog <typo3@susannemoog.de>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarFrederic Gaus <frederic.gaus@flagbit.de>
Reviewed-by: Benni Mack's avatarBenjamin Mack <benni@typo3.org>
Tested-by: Benni Mack's avatarBenjamin Mack <benni@typo3.org>
parent 8cdd1acf
......@@ -15,6 +15,7 @@ namespace TYPO3\CMS\Backend\Sprite;
*/
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\PathUtility;
/**
* An abstract class implementing SpriteIconGeneratorInterface.
......@@ -139,12 +140,19 @@ abstract class AbstractSpriteHandler implements SpriteIconGeneratorInterface {
if (isset($tcaCtrl['iconfile'])) {
// 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($tcaCtrl['iconfile'], '/') !== FALSE) {
if (\TYPO3\CMS\Core\Utility\StringUtility::beginsWith($tcaCtrl['iconfile'], 'EXT:')) {
list($extensionKey, $relativePath) = explode('/', substr($tcaCtrl['iconfile'], 4), 2);
$pathInfo = PathUtility::pathinfo(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extensionKey) . $relativePath);
$path = PathUtility::getRelativePathTo($pathInfo['dirname']);
$icon = $path . $pathInfo['basename'];
} elseif (strpos($tcaCtrl['iconfile'], '/') !== FALSE) {
$icon = $tcaCtrl['iconfile'];
$icon = GeneralUtility::resolveBackPath($icon);
} else {
$icon = $skinPath . 'gfx/i/' . $tcaCtrl['iconfile'];
$icon = GeneralUtility::resolveBackPath($icon);
}
$icon = GeneralUtility::resolveBackPath($icon);
$resultArray['tcarecords-' . $tableName . '-default'] = $icon;
}
// If records types are available, register them
......
......@@ -14,7 +14,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_hotel.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_hotel.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
'shadowColumnsForNewPlaceholders' => 'offers',
......
......@@ -14,7 +14,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_offer.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_offer.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
'shadowColumnsForNewPlaceholders' => 'prices',
......
......@@ -14,7 +14,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_price.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_price.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
),
......
......@@ -14,7 +14,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_hotel.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_hotel.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
// @see http://forge.typo3.org/issues/29278 which solves it implicitly in the Core
......
......@@ -14,7 +14,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_offer.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_offer.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
// @see http://forge.typo3.org/issues/29278 which solves it implicitly in the Core
......
......@@ -14,7 +14,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_price.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_price.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
// @see http://forge.typo3.org/issues/29278 which solves it implicitly in the Core
......
......@@ -14,7 +14,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_hotel.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_hotel.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
),
......
......@@ -13,7 +13,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_hotel_offer_rel.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_hotel_offer_rel.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
// @see http://forge.typo3.org/issues/29278 which solves it implicitly in the Core
......
......@@ -14,7 +14,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_offer.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_offer.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
),
......
......@@ -14,7 +14,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_price.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_price.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
// @see http://forge.typo3.org/issues/29278 which solves it implicitly in the Core
......
......@@ -14,7 +14,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_hotel.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_hotel.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
),
......
......@@ -13,7 +13,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_hotel_offer_rel.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_hotel_offer_rel.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
// @see http://forge.typo3.org/issues/29278 which solves it implicitly in the Core
......
......@@ -14,7 +14,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_offer.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_offer.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
),
......
......@@ -14,7 +14,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_hotel.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_hotel.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
),
......
......@@ -14,7 +14,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_offer.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_offer.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
),
......
......@@ -14,7 +14,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_price.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_price.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
),
......
......@@ -14,7 +14,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_hotel.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_hotel.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
),
......
......@@ -13,7 +13,7 @@ return array(
'enablecolumns' => array(
'disabled' => 'hidden',
),
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('irre_tutorial') . 'Resources/Public/Icons/icon_tx_irretutorial_hotel_rel.gif',
'iconfile' => 'EXT:irre_tutorial/Resources/Public/Icons/icon_tx_irretutorial_hotel_rel.gif',
'versioningWS' => 2,
'origUid' => 't3_origuid',
// @see http://forge.typo3.org/issues/29278 which solves it implicitly in the Core
......
......@@ -30,7 +30,7 @@ $TCA['tx_blogexample_domain_model_blog'] = array (
'fe_group' => 'fe_group',
),
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Blog.php',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_blogexample_domain_model_blog.gif'
'iconfile' => 'EXT:blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_blog.gif'
)
);
......@@ -54,7 +54,7 @@ $TCA['tx_blogexample_domain_model_post'] = array (
'disabled' => 'hidden'
),
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Post.php',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_blogexample_domain_model_post.gif'
'iconfile' => 'EXT:blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_post.gif'
)
);
......@@ -72,7 +72,7 @@ $TCA['tx_blogexample_domain_model_comment'] = array (
'disabled' => 'hidden'
),
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Comment.php',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_blogexample_domain_model_comment.gif'
'iconfile' => 'EXT:blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_comment.gif'
)
);
......@@ -94,7 +94,7 @@ $TCA['tx_blogexample_domain_model_person'] = array (
'disabled' => 'hidden'
),
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Person.php',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_blogexample_domain_model_person.gif'
'iconfile' => 'EXT:blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_person.gif'
)
);
......@@ -110,7 +110,7 @@ $TCA['tx_blogexample_domain_model_tag'] = array (
'disabled' => 'hidden'
),
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Tag.php',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_blogexample_domain_model_tag.gif'
'iconfile' => 'EXT:blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_tag.gif'
)
);
......
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