[TYPO3-mvc] forward() with an object as argument

Florian florian.typo3 at oktopuce.fr
Thu Sep 26 13:42:56 CEST 2013


Hi all,

I would like to know if it's possible with the *forward()* method to 
pass a domain object as argument, see the code bellow :

public function listAction(\OKTOPUCE\myext\Domain\Model\Mymodel $mymodel 
= NULL) {
     if ($mymodel == NULL)
         $mymodel = $this->mymodelRepository->findAll();

     $this->view->assign('mymodel', $mymodel);
}

public function listByTypeAction() {
     $mymodel = $this->mymodelRepository->findByType(0);
     $this->forward("list", NULL, NULL, array ('mymodel' => $mymodel));
}

This code throw the following exception :

#1297759968: Exception while property mapping at property path "":The 
source is not of type string, array, float, integer or boolean, but of 
type "object"

Thanks for your help,

Florian RIVAL
www.oktopuce.fr <http://www.oktopuce.fr/>

P*Please consider the environment before printing this email*



More information about the TYPO3-project-typo3v4mvc mailing list