[TYPO3-mvc] Where to put automatic value calculation

Steffen Ritter info at rs-websystems.de
Tue Dec 8 10:22:22 CET 2009


Steffen Ritter schrieb:
> Hey list,
> I wanna set some field of an object automatically/autogenerated when 
> creating an new object, things like a serial or an password, sth. like 
> this... how do i do best?
> 
> regards
> 
> STeffen
OK,
the storage backend knows about the "new object" status and implements 
the isNew() functionality.

I added an Method _onFirstPersist to the ObjectsInterface which is 
called by the StorageBackend in persistObject if isNew($object) returns 
true.

Patch may be found issue tracker soon.

regards


More information about the TYPO3-project-typo3v4mvc mailing list