[TYPO3-english] Add fields to plugin

Bernhard Kraft kraftb at kraftb.at
Wed Oct 21 22:25:14 CEST 2009


Christian Lerrahn schrieb:
> Hi Bernard,

It's "Bernhard". You missed the "h". But do noth bother about this ;)

Hello Christian!

> I'm aware of the DS. However, the only thing I could think of is to
> read it, modify it and reference the new file. However, this is not a
> very good method if more than one extension does that because they
> would all just know the original DS. Isn't there a way of adding to the
> DS once it has been parsed and loaded into memory? That would solve my
> problem perfectly. :)

Have a look at method "t3lib_befunc::getFlexFormDS()"

This function is responsible for parsing ever DS-XML file into an array.
At the bottom of this method you have a hook
"getFlexFormDS_postProcessDS" which allows you to modify the resulting
$dataStructArray after it has been parsed. You can use this hook to add
new fields on the fly.


greets,
Bernhard


More information about the TYPO3-english mailing list