[TASK] Remove not used ExtDirect component for ext:context_help 87/39287/5
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 5 May 2015 18:25:21 +0000 (20:25 +0200)
committerAndreas Fernandez <typo3@scripting-base.de>
Wed, 6 May 2015 08:26:29 +0000 (10:26 +0200)
Resolves: #66811
Releases: master
Change-Id: Ibcb962d5596cbee34e551ff8a067ebcb91533b1a
Reviewed-on: http://review.typo3.org/39287
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/compatibility6/Migrations/Code/ClassAliasMap.php
typo3/sysext/compatibility6/Migrations/Code/LegacyClassesForIde.php
typo3/sysext/context_help/Classes/Controller/ContextHelpAjaxController.php
typo3/sysext/context_help/Classes/ExtDirect/ContextHelpDataProvider.php [deleted file]
typo3/sysext/core/Classes/Core/Bootstrap.php

index d9d143a..9f5bf7e 100644 (file)
@@ -127,7 +127,6 @@ return array(
        't3lib_extjs_ExtDirectRouter' => \TYPO3\CMS\Core\ExtDirect\ExtDirectRouter::class,
        't3lib_extjs_ExtDirectApi' => \TYPO3\CMS\Core\ExtDirect\ExtDirectApi::class,
        't3lib_extjs_ExtDirectDebug' => \TYPO3\CMS\Core\ExtDirect\ExtDirectDebug::class,
-       'extDirect_DataProvider_ContextHelp' => \TYPO3\CMS\ContextHelp\ExtDirect\ContextHelpDataProvider::class,
        't3lib_userAuth' => \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication::class,
        't3lib_beUserAuth' => \TYPO3\CMS\Core\Authentication\BackendUserAuthentication::class,
        't3lib_autoloader' => \TYPO3\CMS\Core\Core\ClassLoader::class,
index d530a8d..f645904 100644 (file)
@@ -649,11 +649,6 @@ class t3lib_extjs_ExtDirectDebug extends \TYPO3\CMS\Core\ExtDirect\ExtDirectDebu
 /**
  * @deprecated since 6.0, removed since 7.0
  */
-class extDirect_DataProvider_ContextHelp extends \TYPO3\CMS\ContextHelp\ExtDirect\ContextHelpDataProvider {}
-
-/**
- * @deprecated since 6.0, removed since 7.0
- */
 abstract class t3lib_userAuth extends \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication {}
 
 /**
index ee8f61c..37b1910 100644 (file)
@@ -14,9 +14,10 @@ namespace TYPO3\CMS\ContextHelp\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\ContextHelp\ExtDirect\ContextHelpDataProvider;
 use TYPO3\CMS\Core\Http\AjaxRequestHandler;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\Utility\IconUtility;
 
 /**
  * Class ContextHelpAjaxController
@@ -49,7 +50,14 @@ class ContextHelpAjaxController {
         * @return array complete Help information
         */
        protected function getContextHelp($table, $field) {
-               $dataProvider = GeneralUtility::makeInstance(ContextHelpDataProvider::class);
-               return $dataProvider->getContextHelp($table, $field);
+               $helpTextArray = BackendUtility::helpTextArray($table, $field);
+               $moreIcon = $helpTextArray['moreInfo'] ? IconUtility::getSpriteIcon('actions-view-go-forward') : '';
+               return array(
+                       'title' => $helpTextArray['title'],
+                       'description' => '<p class="t3-help-short' . ($moreIcon ? ' tipIsLinked' : '') . '">' . $helpTextArray['description'] . $moreIcon . '</p>',
+                       'id' => $table . '.' . $field,
+                       'moreInfo' => $helpTextArray['moreInfo']
+               );
        }
+
 }
diff --git a/typo3/sysext/context_help/Classes/ExtDirect/ContextHelpDataProvider.php b/typo3/sysext/context_help/Classes/ExtDirect/ContextHelpDataProvider.php
deleted file mode 100644 (file)
index 7098036..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-namespace TYPO3\CMS\ContextHelp\ExtDirect;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * ExtDirect DataProvider for ContextHelp
- *
- * @author Steffen Kamper <steffen@typo3.org>
- */
-class ContextHelpDataProvider {
-
-       /**
-        * Fetch the context help for the given table/field parameters
-        *
-        * @param string $table Table identifier
-        * @param string $field Field identifier
-        * @return array complete Help information
-        */
-       public function getContextHelp($table, $field) {
-               $helpTextArray = \TYPO3\CMS\Backend\Utility\BackendUtility::helpTextArray($table, $field);
-               $moreIcon = $helpTextArray['moreInfo'] ? \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-forward') : '';
-               return array(
-                       'title' => $helpTextArray['title'],
-                       'description' => '<p class="t3-help-short' . ($moreIcon ? ' tipIsLinked' : '') . '">' . $helpTextArray['description'] . $moreIcon . '</p>',
-                       'id' => $table . '.' . $field,
-                       'moreInfo' => $helpTextArray['moreInfo']
-               );
-       }
-
-       /**
-        * Fetch the context help for the given table
-        *
-        * @param string $table Table identifier
-        * @return array Complete help information
-        */
-       public function getTableContextHelp($table) {
-               $output = array();
-               if (!isset($GLOBALS['TCA_DESCR'][$table]['columns'])) {
-                       $this->getLanguageService()->loadSingleTableDescription($table);
-               }
-               if (is_array($GLOBALS['TCA_DESCR'][$table]) && is_array($GLOBALS['TCA_DESCR'][$table]['columns'])) {
-                       $arrow = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-forward');
-                       foreach ($GLOBALS['TCA_DESCR'][$table]['columns'] as $field => $data) {
-                               $output[$field] = array(
-                                       'description' => NULL,
-                                       'title' => NULL,
-                                       'moreInfo' => FALSE,
-                                       'id' => $table . '.' . $field
-                               );
-                               // Add alternative title, if defined
-                               if ($data['alttitle']) {
-                                       $output[$field]['title'] = $data['alttitle'];
-                               }
-                               // If we have more information to show
-                               if ($data['image_descr'] || $data['seeAlso'] || $data['details'] || $data['syntax']) {
-                                       $output[$field]['moreInfo'] = TRUE;
-                               }
-                               // Add description
-                               if ($data['description']) {
-                                       $output[$field]['description'] = $data['description'] . ($output[$field]['moreInfo'] ? $arrow : '');
-                               }
-                       }
-               }
-               return $output;
-       }
-
-       /**
-        * Returns LanguageService
-        *
-        * @return \TYPO3\CMS\Lang\LanguageService
-        */
-       protected function getLanguageService() {
-               return $GLOBALS['LANG'];
-       }
-
-
-}
index a2a6867..9cacc21 100644 (file)
@@ -581,15 +581,32 @@ class Bootstrap {
         */
        protected function registerExtDirectComponents() {
                if (TYPO3_MODE === 'BE') {
-                       Utility\ExtensionManagementUtility::registerExtDirectComponent('TYPO3.Components.PageTree.DataProvider', \TYPO3\CMS\Backend\Tree\Pagetree\ExtdirectTreeDataProvider::class);
-                       Utility\ExtensionManagementUtility::registerExtDirectComponent('TYPO3.Components.PageTree.Commands', \TYPO3\CMS\Backend\Tree\Pagetree\ExtdirectTreeCommands::class);
-                       Utility\ExtensionManagementUtility::registerExtDirectComponent('TYPO3.Components.PageTree.ContextMenuDataProvider', \TYPO3\CMS\Backend\ContextMenu\Pagetree\Extdirect\ContextMenuConfiguration::class);
-                       Utility\ExtensionManagementUtility::registerExtDirectComponent('TYPO3.LiveSearchActions.ExtDirect', \TYPO3\CMS\Backend\Search\LiveSearch\ExtDirect\LiveSearchDataProvider::class, 'web_list', 'user,group');
-                       Utility\ExtensionManagementUtility::registerExtDirectComponent('TYPO3.BackendUserSettings.ExtDirect', \TYPO3\CMS\Backend\User\ExtDirect\BackendUserSettingsDataProvider::class);
-                       if (Utility\ExtensionManagementUtility::isLoaded('context_help')) {
-                               Utility\ExtensionManagementUtility::registerExtDirectComponent('TYPO3.CSH.ExtDirect', \TYPO3\CMS\ContextHelp\ExtDirect\ContextHelpDataProvider::class);
-                       }
-                       Utility\ExtensionManagementUtility::registerExtDirectComponent('TYPO3.ExtDirectStateProvider.ExtDirect', \TYPO3\CMS\Backend\InterfaceState\ExtDirect\DataProvider::class);
+                       Utility\ExtensionManagementUtility::registerExtDirectComponent(
+                               'TYPO3.Components.PageTree.DataProvider',
+                               \TYPO3\CMS\Backend\Tree\Pagetree\ExtdirectTreeDataProvider::class
+                       );
+                       Utility\ExtensionManagementUtility::registerExtDirectComponent(
+                               'TYPO3.Components.PageTree.Commands',
+                               \TYPO3\CMS\Backend\Tree\Pagetree\ExtdirectTreeCommands::class
+                       );
+                       Utility\ExtensionManagementUtility::registerExtDirectComponent(
+                               'TYPO3.Components.PageTree.ContextMenuDataProvider',
+                               \TYPO3\CMS\Backend\ContextMenu\Pagetree\Extdirect\ContextMenuConfiguration::class
+                       );
+                       Utility\ExtensionManagementUtility::registerExtDirectComponent(
+                               'TYPO3.LiveSearchActions.ExtDirect',
+                               \TYPO3\CMS\Backend\Search\LiveSearch\ExtDirect\LiveSearchDataProvider::class,
+                               'web_list',
+                               'user,group'
+                       );
+                       Utility\ExtensionManagementUtility::registerExtDirectComponent(
+                               'TYPO3.BackendUserSettings.ExtDirect',
+                               \TYPO3\CMS\Backend\User\ExtDirect\BackendUserSettingsDataProvider::class
+                       );
+                       Utility\ExtensionManagementUtility::registerExtDirectComponent(
+                               'TYPO3.ExtDirectStateProvider.ExtDirect',
+                               \TYPO3\CMS\Backend\InterfaceState\ExtDirect\DataProvider::class
+                       );
                        Utility\ExtensionManagementUtility::registerExtDirectComponent(
                                'TYPO3.Components.DragAndDrop.CommandController',
                                Utility\ExtensionManagementUtility::extPath('backend') . 'Classes/View/PageLayout/Extdirect/ExtdirectPageCommands.php:' . \TYPO3\CMS\Backend\View\PageLayout\ExtDirect\ExtdirectPageCommands::class