[TYPO3-core] Changing behavior of the TEXT cObject

JoH asenau info at cybercraft.de
Thu Feb 6 09:59:50 CET 2014


Am 06.02.2014 09:08, schrieb François Suter:
> Hi all,
>
> Christopher (from the Doc Team) has proposed to clean up the TEXT
> cObject to make it behave like other cObjects. His patch [1] would throw
> a deprecation warning when root-level properties of the TEXT object are
> used, except "stdWrap". This makes behavior of all cObjects consistent.
>
> In the patch review, Benni objected that the HTML object was deprecated
> because of its behavior and now we would make the TEXT object behave
> like the old HTML object.

IMHO it should be just the other way around, since it's superfluous to 
write stdWrap each time, when each and every cObject is known to have 
the full set of stdWrap properties.

TEXT is the only element so far, that does not make use of that "second 
level" stdWrap, although it's possible to do it, since there is 
stdWrap.stdWrap

So currently we just make an extra call to stdWrap, which should of 
course be avoided, but it would be good to just write

blah = WHATEVER
blah.wrap

instead of

blah = WHATEVER
blah.stdWrap.wrap

and it would be consistent, since we don't do it for the stdWrap 
properties as well.

We are writing

blah.stdWrap.dataWrap.field

and not

blah.stdWrap.dataWrap.stdWrap.field

but actually it should be

blah.dataWrap.field

It would be easier to read and even while parsing the TypoScript it 
would save us some time.


Just my 2 cents

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com


More information about the TYPO3-team-core mailing list