[TASK] Deprecate 'path' of extra click menu option registration 65/17965/5
authorWouter Wolters <typo3@wouterwolters.nl>
Sat, 2 Feb 2013 19:46:51 +0000 (20:46 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 3 Feb 2013 19:24:24 +0000 (20:24 +0100)
Deprecate option 'path' aption of the extendCMclasses registration
array, the autoloader should take care of finding and loading those.

Change-Id: Ibb3edcf3e87a0384f566be8dcdfa016b3731f943
Resolves: #45098
Releases: 6.1
Reviewed-on: https://review.typo3.org/17965
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/alt_clickmenu.php
typo3/sysext/backend/Classes/Controller/ClickMenuController.php
typo3/sysext/extra_page_cm_options/ext_tables.php
typo3/sysext/impexp/ext_tables.php

index c594a37..d3aefdc 100644 (file)
@@ -57,10 +57,15 @@ require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('backen
 // Make instance:
 $SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\ClickMenuController');
 $SOBE->init();
-// Include files?
+
+/**
+ * Include files for extra click menu options
+ * @deprecated since 6.1, will be removed 2 versions later
+ */
 foreach ($SOBE->include_once as $INC_FILE) {
        include_once $INC_FILE;
 }
+
 $SOBE->main();
 $SOBE->printContent();
 ?>
\ No newline at end of file
index ea7e5d7..be99c40 100644 (file)
@@ -41,9 +41,10 @@ class ClickMenuController {
         */
        public $doc;
 
-       // Files to include_once() - set in init() function
        /**
-        * @todo Define visibility
+        * Files to include_once() - set in init() function
+        *
+        * @deprecated since 6.1, will be removed 2 versions later
         */
        public $include_once = array();
 
@@ -76,9 +77,13 @@ class ClickMenuController {
                // Setting internal array of classes for extending the clickmenu:
                $this->extClassArray = $GLOBALS['TBE_MODULES_EXT']['xMOD_alt_clickmenu']['extendCMclasses'];
                // Traversing that array and setting files for inclusion:
+               // @deprecated since 6.1, will be removed 2 versions later
                if (is_array($this->extClassArray)) {
                        foreach ($this->extClassArray as $extClassConf) {
-                               if ($extClassConf['path']) {
+                               if (isset($extClassConf['path'])) {
+                                       \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(
+                                               '$GLOBALS[\'TBE_MODULES_EXT\'][\'xMOD_alt_clickmenu\'][\'extendCMclasses\'][\'path\'] option is not needed anymore. The autoloader takes care of loading the class.'
+                                       );
                                        $this->include_once[] = $extClassConf['path'];
                                }
                        }
index e9c1cb3..b2440a0 100755 (executable)
@@ -5,7 +5,6 @@ if (!defined('TYPO3_MODE')) {
 if (TYPO3_MODE === 'BE') {
        $GLOBALS['TBE_MODULES_EXT']['xMOD_alt_clickmenu']['extendCMclasses'][] = array(
                'name' => 'TYPO3\\CMS\\ExtraPageCmOptions\\ExtraPageContextMenuOptions',
-               'path' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Classes/ExtraPageContextMenuOptions.php'
        );
 }
 ?>
\ No newline at end of file
index 5a8b2d1..9609122 100755 (executable)
@@ -5,7 +5,6 @@ if (!defined('TYPO3_MODE')) {
 if (TYPO3_MODE == 'BE') {
        $GLOBALS['TBE_MODULES_EXT']['xMOD_alt_clickmenu']['extendCMclasses'][] = array(
                'name' => 'TYPO3\\CMS\\Impexp\\Clickmenu',
-               'path' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'class.tx_impexp_clickmenu.php'
        );
        $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']['impexp']['tx_impexp_task'] = array(
                'title' => 'LLL:EXT:impexp/locallang_csh.xml:.alttitle',