From edeb705a9f4b5b13e71b797e676f0c90da147c58 Mon Sep 17 00:00:00 2001 From: Franz Holzinger Date: Wed, 29 Mar 2017 16:31:56 +0200 Subject: [PATCH] add composer.json and Configuration/TCA/Overrides/pages.php --- Configuration/TCA/Overrides/pages.php | 61 +++++++++++++++++++++ composer.json | 77 +++++++++++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100755 Configuration/TCA/Overrides/pages.php create mode 100644 composer.json diff --git a/Configuration/TCA/Overrides/pages.php b/Configuration/TCA/Overrides/pages.php new file mode 100755 index 000000000..d0ae11a52 --- /dev/null +++ b/Configuration/TCA/Overrides/pages.php @@ -0,0 +1,61 @@ +') +) { + $iconRegistry = + \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class); + $iconRegistry->registerIcon( + 'tcarecords-pages-contains-tt_products', + \TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class, + array('source' => $imageFile) + ); + + $GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-tt_products'] = + 'tcarecords-pages-contains-tt_products'; +} else { + // add folder icon + $pageType = 'ttpproduct'; + + $callingClassName = '\\TYPO3\\CMS\\Backend\\Sprite\\SpriteManager'; + if ( + class_exists($callingClassName) && + method_exists($callingClassName, 'addTcaTypeIcon') + ) { + call_user_func( + $callingClassName . '::addTcaTypeIcon', + 'pages', + 'contains-' . $pageType, + $imageFile + ); + } else { + t3lib_SpriteManager::addTcaTypeIcon( + 'pages', + 'contains-' . $pageType, + $imageFile + ); + } + + $addToModuleSelection = TRUE; + foreach ($GLOBALS['TCA']['pages']['columns']['module']['config']['items'] as $item) { + if ($item['1'] == $pageType) { + $addToModuleSelection = FALSE; + continue; + } + } + + if ($addToModuleSelection) { + $GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = array( + 0 => 'LLL:EXT:' . TT_PRODUCTS_EXT . '/locallang.xml:pageModule.plugin', + 1 => $pageType, + 2 => 'EXT:' . TT_PRODUCTS_EXT . '/res/icons/table/tt_products.gif' + ); + } +} + diff --git a/composer.json b/composer.json new file mode 100644 index 000000000..0ffa8701a --- /dev/null +++ b/composer.json @@ -0,0 +1,77 @@ +{ + "name": "jambagecom/tt-products", + "type": "typo3-cms-extension", + "description": "Shop system extension for TYPO3 CMS", + "keywords": [ + "TYPO3", + "extension", + "shop", + "basket", + "cart" + ], + "support": { + "issues": "http://jambage.com/kontakt/forum.html" + }, + "homepage": "https://jambage.com", + "authors": [ + { + "name": "Franz Holzinger", + "role": "Developer", + "homepage": "http://ttproducts.de" + } + ], + "license": [ + "GPL-2.0+" + ], + "require": { + "typo3/cms-core": ">=4.5.0,<8.9.99", + "jambagecom/div2007": ">=1.7.0", + "jambagecom/table": ">=0.3.0", + "jambagecom/tsparser": "", + }, + "suggest": { + "jambagecom/addons_em": "", + }, + "autoload": { + "psr-4": { + "JambageCom\\TtProducts\\": "Classes" + }, + "classmap": [ + "api", + "cache", + "Classes", + "control", + "eid", + "hooks", + "lib", + "marker", + "model", + "modfunc1", + "modfunc2", + "pi1", + "pi_int", + "pi_search", + "view", + "widgets", + ] + }, + "replace": { + "tt_products": "self.version", + "typo3-ter/tt-products": "self.version" + }, + "config": { + "vendor-dir": ".Build/vendor", + "bin-dir": ".Build/bin", + "preferred-install": { + "typo3/cms": "source", + "typo3/cms-core": "source", + "*": "dist" + } + }, + "extra": { + "typo3/cms": { + "cms-package-dir": "{$vendor-dir}/typo3/cms", + "web-dir": ".Build/Web" + } + } +}