[TYPO3-mvc] Configuration of Command Controller
Roland
most.wanted at gmx.at
Fri Jul 20 12:03:09 CEST 2012
> The TS must be located under module.tx_myext.settings - since CLI runs in a BE context.
> This is probably it :)
i did not get it work.
this is my typoscript configuration:
--- TS ---
plugin.tx_accgrebenzenwetter {
settings {
xmlFile {
local {
fileName = wetter.xml
}
remote {
path =
http://www.zamg.ac.at/markt/stLGrbz/wetter_skigebiet_grebenzen.xml
}
}
}
}
module.tx_accgrebenzenwetter < plugin.tx_accgrebenzenwetter
--- /TS ---
and this is my command controller:
--- PHP ---
public function fetchXmlFileCommand() {
$configurationManager =
t3lib_div::makeInstance('Tx_Extbase_Configuration_ConfigurationManager');
$this->settings =
$configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS);
$fileName = $this->settings['xmlFile']['remote']['path'];
$fileContent = t3lib_div::getUrl($fileName);
t3lib_div::writeFile(PATH_site . 'uploads/tx_accgrebenzenwetter/' .
$this->settings['xmlFile']['local']['filename'], $fileContent);
}
--- /PHP ---
all i get is an empty wetter.xml file and this error message:
--- QUOTE ---
Relative path found, but an error occurred while resolving the absolute
path:
/srv/www/vhosts/austriaspora.at/demo/ivm-website-grebenzen/uploads/tx_accgrebenzenwetter/..typo3/cli_dispatch.phpsh
--- /QUOTE ---
so i guess the configuration could not be read.
how can i get the configuration? i used
Tx_Extbase_Configuration_ConfigurationManager. is this the right way?
kind regards.
roland
More information about the TYPO3-project-typo3v4mvc
mailing list