[TYPO3-mvc] Pass Arguments to a forward call
Claus Due
claus at wildside.dk
Tue Aug 28 18:11:19 CEST 2012
Hi Robert,
This should work:
$this->forward($action, NULL, NULL, $this->request->getArguments());
See also this, and other setters/getters on the same class:
http://fedext.net/request/web-request.html#setArgument
…for information about how to manipulate the arguments before forwarding them.
Cheers,
Claus
http://fedext.net
On Aug 28, 2012, at 5:43 PM, Robert Schneider <r.schneider at artworx.at> wrote:
> I try to forward to an action in my controller. I'm able to pass an Tx_Extbase_DomainObject_AbstractEntity. However, I'm not able to pass some 'normal' arguments.
>
> Here is what I have in short in the controller:
>
> $args = array();
> $args['user'] = $user;
> $args['warnings'] = $warnings;
> $this->forward('register', NULL, NULL, $args);
>
> The user object which is actually an Tx_Extbase_Domain_Model_FrontendUser object gets passed without any problems. But the $warnings array does not. It's just an string array. The template looks like this (only the problem part here):
>
> <f:if condition="{warnings}">
> Some warnings:
> <ul>
> <f:for each="{warnings}" as="w">
> <li>{w}</li>
> </f:for>
> </ul>
> </f:if>
>
> But the warn messages does not get shown. I guess I have to pass the warnings different.
>
> Could anyone give me a hint?
>
> Robert
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
More information about the TYPO3-project-typo3v4mvc
mailing list