[Flow] Setting cookie inside a widget controller action?
Christian Loock
chl at vkf-renzel.de
Mon Sep 8 15:23:03 CEST 2014
Hi,
is there a way to set a cookie inside a Widget Controller? I tried
something like this, which does not seem to work:
$httpRequest = $this->request->getHttpRequest();
if ($httpRequest->hasCookie('systemLanguage')) {
$cookie = $httpRequest->getCookie('systemLanguage');
} else {
$cookie = new \TYPO3\Flow\Http\Cookie('systemLanguage');
}
$cookie->setValue($locale);
$this->response->setCookie($cookie);
Is there something special about widget controllers that this does not
work? When I do the same in a normal controller, it works just like you
would expect it to.
Cheers,
Christian
More information about the Flow
mailing list