[TYPO3-mvc] Pass Arguments to a forward call

Robert Schneider r.schneider at artworx.at
Tue Aug 28 17:43:06 CEST 2012


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


More information about the TYPO3-project-typo3v4mvc mailing list