[TYPO3-mvc] how to convert flag/type and bitmask values for output in the view

Martin Kutschker masi-no at spam-typo3.org
Sun Dec 27 15:25:29 CET 2009


Steffen Ritter schrieb:
> Martin Kutschker schrieb:
>>> could make an own viewhelper rendering the above mentioned code for
>>> usage:
>>> <own:booleanTranslated property="myProperty" />
>>
>> Again, I have to write custom code for a common task.
> Hey Masi,
> you're right, currently there is much code for "common tasks" you have
> to write on your own. v.1 of extbase / fluid just provides the framework.
> Bitmasks for with only one setter is not "really OO" but TYPO3 way.

Is a general setter like setPropery($property, $value) more OO in your way? I don't have heard about
setters and getters for the first time with ExtBase or FLOW3. I see the reason for the
encapsulation, but yet I find it annoying to write a setter/getter pair. Doesn't make the code more
readable either. Lots of "filler code" and so it's hard to find the place where the real action is.

> So
> if you have an viewhelper for that, make it public, next version could
> include a bunch of "TYPO3 v4 way" viewhelpers.
> But they are not "portable" anymore.

But ExtBase exists in v4. A bit strange that many features of v4 so are so hard to achieve now.

Maybe I'm only missing a generated stub class for TCA tables. Or perhaps ExtBase could create a TCA
definition from a domain object class. Either way, my point is that having to rewrite code and
definitions that are existing in the TCA is tiring,

> You could think of an viewhelper <v4:tca.select property="xyz">
> <v4.tca.check property="xyz"> ... automatically rendering the infos with
> tranlsation information derived from tca - should be no problem at
> all... but how to use in in v5?

No idea. Haven't expected that the transition is expected to be that smooth.

>> Steffen, thanx for detailed answers. I'll try to implement them. I
>> hope that ExtBase and FLUID will
>> evolve to assist the coder in common tasks. Currently it seems that
>> while I have not to worry about
>>  persistence I have to write many repeating lines of code for simple
>> stuff (question a).
> 
> Yes currently it's very much "duplicity" :)

Looking forward for a solution for that.

Masi


More information about the TYPO3-project-typo3v4mvc mailing list