[TYPO3-mvc] opposite to initializeAction
Martin Kutschker
masi-no at spam-typo3.org
Tue Jun 15 20:58:13 CEST 2010
Sebastian Kurfürst schrieb:
>
>> And is there a method like beforeSave?
>
> Nope, as the saving occurs lazily after the response has already been
> sent to the client. What do you need such a method for?
Eg to fill in some default properties. Of course you could do that when the object is created. OTOH
you might destroy it for some reason before it is persisted, so why bother when it can be done
lazily in a beforePersisting() method?
Other than that you might want to to perform some extra tasks that make only sense when the object
is sent to disk (eg some housekeeping or updating of stats, etc). But instead of a beforeSave() this
could perhaps be solbed by an Observer or Event pattern.
Masi
More information about the TYPO3-project-typo3v4mvc
mailing list