[TYPO3-mvc] Enumeration
Felix Oertel
mehl at foertel.com
Wed Apr 28 13:11:24 CEST 2010
hi,
Am 28.04.10 12:55, schrieb dennis ahrens:
> has anyone implemented an enumeration as property for an entity or value object?
> What do you think about an exception throwing setter which just
> accepts the allowed values?
> Or do you prefer a own class, that represents the enumeration?
I don't really understand, what you're trying to do. ;-) Do you have an
usecase / example at hand?
I implemented an enumerator as fluid-viewHelper:
<f:for each="{myObject.images}" as="image">
<f:enumerator as="counter" offset="1">
<this:image photo="{image}" id="pic-{counter}" />
</f:enumerator>
</f:for>
this will count up $counter (starting with 1) on every run through f:for.
regards, foertel
More information about the TYPO3-project-typo3v4mvc
mailing list