[TYPO3-mvc] Models not coming from Database
Jochen Rau
jochen.rau at typoplanet.de
Tue Nov 17 10:43:53 CET 2009
Hi Steffen.
Steffen Ritter wrote:
> Am I able to define a Model where the Objects not really works on database?
> If I see this correctly, i should define the Model-CLass as every other
> to, and write my complete own Repository Just implementing the interface
> with my own "loadObject" and "saveObject" logic.
Yes, that is possible. Just implement the interface
Tx_Extbase_Persistence_RepositoryInterface and put your custom
Repository into my_ext/Classes/Domain/Repository/EventRepository,php.
> I'm currently thinking about how using "cal" within extbase. I'm
> planning to have a PseudoObject which just calls the Service of Cal and
> provides the information I need.
What do you mean with "pseudo" object? It could be a full featured
domain object "Event" for example.
Another way is to map (some) database fields of tx_cal_event onto your
domain object Event, like
config.tx_myext {
persistence{
classes {
Tx_MyExt_Domain_Model_Event {
mapping {
tableName = tx_cal_event
columns {
foo.mapOnProperty = bar
}
}
}
}
}
}
}
The problem is the custom date format of cal. Maybe you find a solution
for this.
Regards
Jochen
--
Every nit picked is a bug fixed
More information about the TYPO3-project-typo3v4mvc
mailing list