[TYPO3-mvc] [solved] Controller $this->forward with arguments - does not work?
Tim Schoch | GSTALTIG
tim.schoch at gstaltig.ch
Mon Mar 28 15:04:30 CEST 2011
To easy... Just add $this->forward( 'foo' ); and all the original arguments are passed.
Doesn't solve the problem if I would have wanted to add new/change arguments, but for now it works.
Cheers, Tim
_____
From: Tim Schoch | GSTALTIG [mailto:tim.schoch at gstaltig.ch]
To: typo3-project-typo3v4mvc at lists.typo3.org
Sent: Mon, 28 Mar 2011 14:55:36 +0200
Subject: [TYPO3-mvc] Controller $this->forward with arguments - does not work?
Hello List
I'm failing at a simple task:
In my app I wan't to forward from one controller action to another by passing an argument.
----------------------------
/* @param Item $item */
controller->entryAction( Item $item ) {
switch( $item->getType() ) {
case 'foo':
$this->forward( 'foo', NULL, NULL, array( 'item' => $item ) );
break;
case 'bar':
$this->forward( 'bar', NULL, NULL, array( 'item' => $item ) );
break;
...
}
}
(Code shortened)
----------------------------
Problem is, I always get this Error:
----------------------------
An error occurred while trying to call Tx_Myext_Controller_ITemController->fooAction().
Error: Required property 'item' does not exist.
----------------------------
But the $item must be totaly fine, as it has already passed the validation as the entryAction was called.
How is it supposed to be done?
Thanks in advance
Tim
_______________________________________________
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