[TYPO3-mvc] Persist objects after adding or updating

Philipp Wrann philippwrann at gmail.com
Fri Aug 1 09:39:59 CEST 2014


I like the method of injecting the persistenceManager in my controller, that way i can persist my model and do a redirect using just the uid. Seems more robust to me.

That way you would hava a createAction like this:
this->repository->add(obejct);
this->persistenceManager->persistAll();
this-redirect('show',NULL,NULL,array('object',object->getUid(),0,302);

when creating user-request data or something like that think about adding a hash as check, so no one can fish data by passing a lower uid to a success uri.


More information about the TYPO3-project-typo3v4mvc mailing list