/** * injectConfigurationManager * * @param Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager * @return void */ public function injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager) { $this->configurationManager = $configurationManager; $this->contentObj = $this->configurationManager->getContentObject(); $this->settings = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS); // merge the storagePid into settings for the cache tags $frameworkConfiguration = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK); $this->settings['storagePid'] = $frameworkConfiguration['persistence']['storagePid']; }
/** * Injects the Configuration Manager and is initializing the framework settings * * @param Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager Instance of the Configuration Manager * @return void */ public function injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager) { $this->configurationManager = $configurationManager; $tsSettings = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, 'news', 'news_pi1'); $originalSettings = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS); // start override if (isset($tsSettings['settings']['overrideFlexformSettingsIfEmpty'])) { $overrideIfEmpty = t3lib_div::trimExplode(',', $tsSettings['settings']['overrideFlexformSettingsIfEmpty'], TRUE); foreach ($overrideIfEmpty as $key) { // if flexform setting is empty and value is available in TS if ((!isset($originalSettings[$key]) || empty($originalSettings[$key])) && isset($tsSettings['settings'][$key])) { $originalSettings[$key] = $tsSettings['settings'][$key]; } } } // Use stdWrap for given defined settings if (isset($originalSettings['useStdWrap']) && !empty($originalSettings['useStdWrap'])) { if (class_exists('Tx_Extbase_Service_TypoScriptService')) { $typoScriptService = t3lib_div::makeInstance('Tx_Extbase_Service_TypoScriptService'); } else { $typoScriptService = t3lib_div::makeInstance('Tx_Extbase_Utility_TypoScript'); } $typoScriptArray = $typoScriptService->convertPlainArrayToTypoScriptArray($originalSettings); $stdWrapProperties = t3lib_div::trimExplode(',', $originalSettings['useStdWrap'], TRUE); foreach ($stdWrapProperties as $key) { if (is_array($typoScriptArray[$key . '.'])) { $originalSettings[$key] = $this->configurationManager->getContentObject()->stdWrap($originalSettings[$key], $typoScriptArray[$key . '.']); } } } $this->settings = $originalSettings; }
/** * @param Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager * @return void */ public function injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager) { $this->configurationManager = $configurationManager; $this->cObj = $this->configurationManager->getContentObject(); $this->typoScriptSetup = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT); $this->settings = $this->typoScriptSetup['plugin.']['tx_powermail.']['settings.']['setup.']; $this->piVars = t3lib_div::_GP('tx_powermail_pi1'); }
/** * Handles the web request. The response will automatically be sent to the client. * * @return Tx_Extbase_MVC_Web_Response */ public function handleRequest() { $request = $this->requestBuilder->build(); // Request hash service $requestHashService = $this->objectManager->get('Tx_Extbase_Security_Channel_RequestHashService'); // singleton $requestHashService->verifyRequest($request); if ($this->isCacheable($request->getControllerName(), $request->getControllerActionName())) { $request->setIsCached(TRUE); } else { $contentObject = $this->configurationManager->getContentObject(); if ($contentObject->getUserObjectType() === tslib_cObj::OBJECTTYPE_USER) { $contentObject->convertToUserIntObject(); // tslib_cObj::convertToUserIntObject() will recreate the object, so we have to stop the request here return; } $request->setIsCached(FALSE); } $response = $this->objectManager->create('Tx_Extbase_MVC_Web_Response'); $this->dispatcher->dispatch($request, $response); return $response; }
/** * @param Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager * @return void */ public function injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager) { $this->configurationManager = $configurationManager; $this->contentObject = $this->configurationManager->getContentObject(); }
/** * Life-cycle method that is called by the DI container as soon as this object is completely built * * @return void */ public function initializeObject() { $this->contentObject = $this->configurationManager->getContentObject(); }
/** * Returns TRUE if what we are outputting may be cached * * DEPRECATED - but will be moved to a more suitable location such as a possible * cache manager or other Service. * * @return boolean * @deprecated */ public function isCached() { $userObjType = $this->configurationManager->getContentObject()->getUserObjectType(); return $userObjType !== tslib_cObj::OBJECTTYPE_USER_INT; }
/** * Returns TRUE if what we are outputting may be cached * * @return boolean */ protected function isCached() { $userObjType = $this->configurationManager->getContentObject()->getUserObjectType(); return $userObjType !== \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::OBJECTTYPE_USER_INT; }
/** * injectConfigurationManager * * @param Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager * @return void */ public function injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager) { $this->configurationManager = $configurationManager; $this->contentObj = $this->configurationManager->getContentObject(); $this->settings = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS); }
/** * @param Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager * @return void */ public function injectConfigurationManager(Tx_Extbase_Configuration_ConfigurationManagerInterface $configurationManager) { $this->configurationManager = $configurationManager; $this->contentObject = $this->configurationManager->getContentObject(); $this->typoScriptSetup = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT); }
/** * Returns the data array of the current content object * * @return array data of the current cObj * @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0. Use the ConfigurationManager to retrieve the current ContentObject * @author Bastian Waidelich <*****@*****.**> */ public function getContentObjectData() { t3lib_div::logDeprecatedFunction(); $contentObject = $this->configurationManager->getContentObject(); return $contentObject->data; }