[-TASK] Extbase (Utility): Removed two obsolete checks for $GLOBALS['TSFE']->tmpl...
authorBastian Waidelich <bastian@typo3.org>
Sun, 14 Nov 2010 16:44:26 +0000 (16:44 +0000)
committerBastian Waidelich <bastian@typo3.org>
Sun, 14 Nov 2010 16:44:26 +0000 (16:44 +0000)
[~TASK] Extbase: added two doc comments that were missing

typo3/sysext/extbase/Classes/Core/Bootstrap.php
typo3/sysext/extbase/Classes/MVC/RequestHandlerResolver.php
typo3/sysext/extbase/Classes/Utility/Extension.php

index 8416d4b..3d329e4 100644 (file)
@@ -236,6 +236,11 @@ class Tx_Extbase_Core_Bootstrap {
                return $content;
        }
 
                return $content;
        }
 
+       /**
+        * Resets global singletons for the next plugin
+        *
+        * @return void
+        */
        protected function resetSingletons() {
                $this->reflectionService->shutdown();
                $this->objectManager->get('Tx_Extbase_MVC_Controller_FlashMessages')->reset();
        protected function resetSingletons() {
                $this->reflectionService->shutdown();
                $this->objectManager->get('Tx_Extbase_MVC_Controller_FlashMessages')->reset();
index 65cea4e..82deecb 100644 (file)
@@ -99,6 +99,11 @@ class Tx_Extbase_MVC_RequestHandlerResolver {
                return array_pop($suitableRequestHandlers);
        }
 
                return array_pop($suitableRequestHandlers);
        }
 
+       /**
+        * Returns a list of all registered request handlers.
+        *
+        * @return array
+        */
        public function getRegisteredRequestHandlerClassNames() {
                $settings = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
                return is_array($settings['mvc']['requestHandlers']) ? $settings['mvc']['requestHandlers'] : array();
        public function getRegisteredRequestHandlerClassNames() {
                $settings = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
                return is_array($settings['mvc']['requestHandlers']) ? $settings['mvc']['requestHandlers'] : array();
index 3eafebc..4c103db 100644 (file)
@@ -495,9 +495,6 @@ tt_content.list.20.' . $pluginSignature . ' {
                $defaultPluginNamespace = 'tx_' . $pluginSignature;
                $objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
                $configurationManager = $objectManager->get('Tx_Extbase_Configuration_ConfigurationManagerInterface');
                $defaultPluginNamespace = 'tx_' . $pluginSignature;
                $objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
                $configurationManager = $objectManager->get('Tx_Extbase_Configuration_ConfigurationManagerInterface');
-               if (!isset($configurationManager) || !isset($GLOBALS['TSFE']->tmpl->setup['tt_content.']['list.']['20.']) || !is_array($GLOBALS['TSFE']->tmpl->setup['tt_content.']['list.']['20.'])) {
-                       return $defaultPluginNamespace;
-               }
                $frameworkConfiguration = $configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, $extensionName, $pluginName);
                if (!isset($frameworkConfiguration['view']['pluginNamespace']) || empty($frameworkConfiguration['view']['pluginNamespace'])) {
                        return $defaultPluginNamespace;
                $frameworkConfiguration = $configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, $extensionName, $pluginName);
                if (!isset($frameworkConfiguration['view']['pluginNamespace']) || empty($frameworkConfiguration['view']['pluginNamespace'])) {
                        return $defaultPluginNamespace;
@@ -556,16 +553,13 @@ tt_content.list.20.' . $pluginSignature . ' {
         * @return integer uid of the target page or NULL if target page could not be determined
         */
        static public function getTargetPidByPlugin($extensionName, $pluginName) {
         * @return integer uid of the target page or NULL if target page could not be determined
         */
        static public function getTargetPidByPlugin($extensionName, $pluginName) {
-               $pluginSignature = strtolower($extensionName . '_' . $pluginName);
                $objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
                $configurationManager = $objectManager->get('Tx_Extbase_Configuration_ConfigurationManagerInterface');
                $objectManager = t3lib_div::makeInstance('Tx_Extbase_Object_ObjectManager');
                $configurationManager = $objectManager->get('Tx_Extbase_Configuration_ConfigurationManagerInterface');
-               if (!isset($configurationManager) || !isset($GLOBALS['TSFE']->tmpl->setup['tt_content.']['list.']['20.']) || !is_array($GLOBALS['TSFE']->tmpl->setup['tt_content.']['list.']['20.'])) {
-                       return NULL;
-               }
                $frameworkConfiguration = $configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, $extensionName, $pluginName);
                if (!isset($frameworkConfiguration['view']['defaultPid']) || empty($frameworkConfiguration['view']['defaultPid'])) {
                        return NULL;
                }
                $frameworkConfiguration = $configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, $extensionName, $pluginName);
                if (!isset($frameworkConfiguration['view']['defaultPid']) || empty($frameworkConfiguration['view']['defaultPid'])) {
                        return NULL;
                }
+               $pluginSignature = strtolower($extensionName . '_' . $pluginName);
                if ($frameworkConfiguration['view']['defaultPid'] === 'auto') {
                        $pages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                                'pid',
                if ($frameworkConfiguration['view']['defaultPid'] === 'auto') {
                        $pages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                                'pid',