[TYPO3-mvc] Extension Builder and realtions

mario chiari ml at mariochiari.net
Thu Jun 27 12:43:26 CEST 2013


On Mon, 2013-06-24 at 21:30 +0200, Anja Leichsenring wrote:
> Hi Sven,
> 
> On 06/24/2013 09:18 PM, Sven Hofacker wrote:
> > Hello Anja,
....

> > last question:
> >
> > is it possible, to create a Edit.html which will give me a List like
> > List.html that i can edit the fields from the records and save them with
> > one klick.
> 
> It might be possible, but that would mean to work against extbase, 

why so?

> not 
> with it. After you just begun with the journey, I strongly advice to 
> stick to the basics (one object per form) and gain experience, before 
> you step next to the road.

indeed, you often need to have a form with more than one object. 

In Flow, I tried something along the following lines.  Say you have a
Man model, and a client side form by which a user may create several Man
objects.
Then it works if I define a controller something like:

 * @param array<\...\Domain\Model\Man> $Man An array of Man to create
	 public function createAction(array $Man) {
  foreach($Man as $manArr){
 $propertyMapper = new \TYPO3\Flow\Property\PropertyMapper();
 $manObj = $propertyMapper->convert($manArr,'\...\Domain\Model\Man');
 $this->manRepository->add($manObj);
 }}

I would like to know if a similar trick works for extbase too.
cheers
mario


...



More information about the TYPO3-project-typo3v4mvc mailing list