[TYPO3-mvc] How to get calculated data from a query into an object?
Franz Koch
typo3.RemoveForMessage at elements-net.de
Wed Feb 17 13:22:51 CET 2010
Hi,
> Depends on the method you use to calculate the disctance
I calculate the distance based on latitude and longitude of both, the
visitors location and the stores address (geolocating).
> I would introduce a virtual property by adding a getter to the model
> returning the calculated distance
> Is this an option?
I would need a service then for this, which I first have to pass the
visitors location/coordinates somehow because the store does not know
about those. This would probably work, but as I wrote I'm trying to
avoid double calculations, as the DB has to do the calculation anyway.
But it seems that my ambition for this is not in demand of OOP ;) So the
suggested way really seems to be to create a workaround via a service or
probably even a viewHelper doing calculcations. Maybe I should rethink
my concept therefor again.
Thanks for your thoughts guys.
--
kind regards,
Franz Koch
More information about the TYPO3-project-typo3v4mvc
mailing list