[TYPO3-mvc] Settings inside a Validator
Bastian Waidelich
bastian at typo3.org
Thu Feb 24 16:46:53 CET 2011
Georg Ringer wrote:
Hi Georg,
> with
> $fo = Tx_MyExt_Service_PluginSettingsService::getSettings();
> t3lib_div::print_array($fo);
>
> I get an empty array,
$pluginSettingsService =
$this->objectManager->get('Tx_MyExt_Service_PluginSettingsService');
t3lib_div::print_array($pluginSettingsService->getSettings());
If the ObjectManager is not available in your object, see [1]
An alternative is to inject the ConfigurationManager directly [2]
HTH,
Bastian
[1]
<http://forge.typo3.org/projects/typo3v4-mvc/wiki/Dependency_Injection_%28DI%29#Creating-Prototype-Objects-through-the-Object-Manager>
[2]
http://forge.typo3.org/projects/typo3v4-mvc/wiki/ConfigurationManager_rework
More information about the TYPO3-project-typo3v4mvc
mailing list