[TYPO3-mvc] fluid: object.accessor and method with arguments
Peter Niederlag
typo3-list at niekom.de
Mon Mar 29 11:42:09 CEST 2010
Hello,
Thx for your feedback! :->
Franz Koch schrieb:
> Hi Peter,
>
>> I assign my Object to the view. Now I would like to call method on the
>> object within the fluid-template and hand over a parameter to the method.
> ...
>> Implementing a ViewHelper for this seems not the right way to me, as
>> this doen't belong to the view but to the model/business logic.
>
> Why not?
Well, basically because I don't want to implement a ViewHelper for every
piece of domain/business logic.
> <f:format.price price="{yourObject.totalPriceForConsumption}"
> units="{units}" colorize="true" />
[...]
> And if you don't want to put some domain logic inside a viewHelper, let
> the viewHelper call a domain service.
That's exactly the point, still then I would need a special viewHelper
for every call to a domain logic to wrap my domain service if I get you
right.
After thinking again and having a short chat with Sebastian I found it
very easy and clear to implement a "generic" MethodInvocationViewHelper,
which quite likely does this in a general way, see my other post. Works
for me. ;)
Greets,
Peter
--
Peter Niederlag
http://www.niekom.de * TYPO3 & EDV Dienstleistungen *
More information about the TYPO3-project-typo3v4mvc
mailing list