[Flow] Correct frontend urls with CLI, StandaloneView, ActionViewHelper?
Tobias Pinnekamp
typo3 at tpinne.de
Tue Sep 3 22:42:17 CEST 2013
Hi all,
I want to send mails with a CommandController rendered by a StandaloneView. I've got everything running but the generated links in the rendered view start with "http://localhost./index.php/...". The rest of the link is just fine. But I think the problem is the CLI context.
I got it working, but it is more of a hack than solution I want to use in production.
putenv('REDIRECT_FLOW_REWRITEURLS=true');
$routesConfiguration = $this->configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_ROUTES);
// Injected \TYPO3\Flow\Mvc\Routing\RouterInterface
$this->router->setRoutesConfiguration($routesConfiguration);
$httpRequest = \TYPO3\Flow\Http\Request::create(new \TYPO3\Flow\Http\Uri('http://my.domain.local'));
$request = new \TYPO3\Flow\Mvc\ActionRequest($httpRequest);
$view = new StandaloneView($request);
Is there a less hacky way to so?
Best regards
Tobi
More information about the Flow
mailing list