[TYPO3-mvc] Question about Filter-Objects

Steffen Ritter info at rs-websystems.de
Fri Mar 12 18:01:43 CET 2010


Hey List,
I'm currently thinking about realizing an Filter-Object for an listView.

I "need" a kind of Entity, which should not be persisted automatically.
Building an "normal" entity object, and an form for passing an object to 
my Controller-Action, the Object automatically will be persisted to 
database. But for an filter set by user I do not need this (and 
furthermore do not want it!).
On the other hand, I need same FilterObject to be created as record in 
Database (at backend) so that an admin can create an filter, and insert 
an filtered ListView-Plugin.

I thought about, building an Filter Object which is not an entity, but 
exists as regular TCA-Table which may be created in BE.
Furthermore I would add an "MergeFromDatabase($uid)" method, which loads 
an DB Record via t3lib_db into to the filter object.
So if List ist not filtered at all, but a "filter is set in be" I could 
create an empty object, just calling "MergeFromDB", if there is an 
filter object passed, i just would call mergeFromDB inside this Object.

What do you think about this "workaround"? Is there another possibility 
to get this working?

regards

Steffen


More information about the TYPO3-project-typo3v4mvc mailing list