[+TASK] Fluid (ViewHelpers): Minor tweak in CObject ViewHelper
authorBastian Waidelich <bastian@typo3.org>
Tue, 26 Oct 2010 14:27:46 +0000 (14:27 +0000)
committerBastian Waidelich <bastian@typo3.org>
Tue, 26 Oct 2010 14:27:46 +0000 (14:27 +0000)
Make sure, that the configurationManager is initialized.
This is just a preliminary solution that will be replaced as soon
as the Extbase dispatcher refactoring (#7153) is done.

typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php

index 15fbbb7..51ea76d 100644 (file)
@@ -48,6 +48,10 @@ class Tx_Fluid_ViewHelpers_CObjectViewHelper extends Tx_Fluid_Core_ViewHelper_Ab
                        $this->typoScriptSetup = $typoScriptSetup;
                } else {
                        $configurationManager = Tx_Extbase_Dispatcher::getConfigurationManager();
+                       if ($configurationManager === NULL) {
+                               $configurationManager = t3lib_div::makeInstance('Tx_Extbase_Configuration_FrontendConfigurationManager');
+                               $configurationManager->setContentObject($this->contentObject);
+                       }
                        $this->typoScriptSetup = $configurationManager->loadTypoScriptSetup();
                }
        }