[FLOW3-general] Feature in TagBuilder
Bastian Waidelich
bastian at typo3.org
Tue Oct 18 09:55:50 CEST 2011
Adrian Föder wrote:
Hi Adrian,
> I of course like the current implementation of the TagBuilder very much;
> I ever liked to built something like that on my own.
> I would like to come up with an improvement that I think makes sense;
> it's about the "addAttribute" thing.
I agree that we should treat the TagBuilder with some convenience
methods. Something like appendContent() and hasAttribute() would be
helpful too.
Concerning your idea to make addAttribute() adding the value to the
existing attribute - I'm not sure about that one. It would be a bit
intransparent and only really make sense for the class & style
attribute. Instead I'd suggest to introduce setAttribute() (as you
suggested) which ands or replaces existing attribute and something like
appendAttribute() that extends the value. But I'm open to be convinced
otherwise ;)
I added your ideas to a similar issue at http://forge.typo3.org/issues/30555
Best,
Bastian
More information about the FLOW3-general
mailing list