[TYPO3-mvc] NumberChoiceViewHelper

Christian Zenker christian.zenker at 599media.de
Mon Feb 21 16:29:59 CET 2011


Hi.

>> Since i like symfony very much, i converted the
>> NumberChoiceViewHelper of symfony to fluid.
Yeah, that sounded familiar. :)

> But I don't think, that the notation of the conditions follows the
> general approach of fluid.

You are right.
But there are good reasons why I find this viewHelper very helpfull *at  
this time* (although I'm not using it in any extension right now).

First: Why reinvent the wheel if there is an open-source solution that has  
been tested for more than 5 years and is still helpful today?

Secondly, let's assume you manage some user accounts through your extbase  
extension and would like to display when a user was seen for the last  
time. If you'd like to display strings just like "online right now", "a  
few minutes ago", "today", "this week", etc. - well... do that with the  
current If-, Then- and ElseViewHelper. Good luck :)

The thing is we need an ElseIfViewHelper and a rework for the condition  
property of the IfViewHelper (or to be more precise the boolean-evaluator)  
to do something like the above use case to make the numberChoiceViewHelper  
obsolete.

I guess someone has already put some (brain) work into those two  
issues...(?) If not, I would volunteer to do that.

Christian.



PS: In Symfony this viewHelper is part of the l18n-package, but I could  
not find any example where foreign languages would have to use different  
intervals. Maybe someone (who knows more languages then me) has an example  
for that?


More information about the TYPO3-project-typo3v4mvc mailing list