/** * Returns the specified configuration. * The actual configuration will be merged from different sources in a defined order. * * You can get the following types of configuration invoking: * CONFIGURATION_TYPE_SETTINGS: Extbase settings * CONFIGURATION_TYPE_FRAMEWORK: the current module/plugin settings * CONFIGURATION_TYPE_FULL_TYPOSCRIPT: a raw TS array * * Note that this is a low level method and only makes sense to be used by Extbase internally. * * @param string $configurationType The kind of configuration to fetch - must be one of the CONFIGURATION_TYPE_* constants * @param string $extensionName if specified, the configuration for the given extension will be returned. * @param string $pluginName if specified, the configuration for the given plugin will be returned. * @throws Exception\InvalidConfigurationTypeException * @return array The configuration */ public function getConfiguration($configurationType, $extensionName = NULL, $pluginName = NULL) { switch ($configurationType) { case self::CONFIGURATION_TYPE_SETTINGS: $configuration = $this->concreteConfigurationManager->getConfiguration($extensionName, $pluginName); return $configuration['settings']; case self::CONFIGURATION_TYPE_FRAMEWORK: return $this->concreteConfigurationManager->getConfiguration($extensionName, $pluginName); case self::CONFIGURATION_TYPE_FULL_TYPOSCRIPT: return $this->concreteConfigurationManager->getTypoScriptSetup(); default: throw new \TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException('Invalid configuration type "' . $configurationType . '"', 1206031879); } }
/** * @test */ public function getContentObjectTheCurrentContentObject() { $mockContentObject = $this->getMock('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer'); $this->abstractConfigurationManager->setContentObject($mockContentObject); $this->assertSame($this->abstractConfigurationManager->getContentObject(), $mockContentObject); }