[TASK] Introduce getter for $GLOBALS['LANG'] in ext:context_help 98/37298/2
authorMichael Oehlhof <typo3@oehlhof.de>
Thu, 26 Feb 2015 22:22:43 +0000 (23:22 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 26 Feb 2015 22:44:11 +0000 (23:44 +0100)
Resolves: #65369
Releases: master
Change-Id: Id488fb523c3b3dcc255f9c5d36af537abec267d0
Reviewed-on: http://review.typo3.org/37298
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/context_help/Classes/ExtDirect/ContextHelpDataProvider.php

index ff6f3d6..7098036 100644 (file)
@@ -48,7 +48,7 @@ class ContextHelpDataProvider {
        public function getTableContextHelp($table) {
                $output = array();
                if (!isset($GLOBALS['TCA_DESCR'][$table]['columns'])) {
-                       $GLOBALS['LANG']->loadSingleTableDescription($table);
+                       $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');
@@ -76,4 +76,14 @@ class ContextHelpDataProvider {
                return $output;
        }
 
+       /**
+        * Returns LanguageService
+        *
+        * @return \TYPO3\CMS\Lang\LanguageService
+        */
+       protected function getLanguageService() {
+               return $GLOBALS['LANG'];
+       }
+
+
 }