[TYPO3-dev] getting data out of flexForm structure

Dr. Ronald P. Steiner Ronald.Steiner at googlemail.com
Sun Feb 24 21:13:51 CET 2008


Hi Dimitry,

but using pi_initPIflexForm() does not work in this case
I have the  felexForm data as a string and want to get it as an array. 
pi_initPIflexForm($field) changes $this->cObj->data[$field] from a 
flexForm string to an array.

greetings

Ron


Dmitry Dulepov [typo3] schrieb:
> Hi!
> 
> Dr. Ronald P. Steiner wrote:
>> basically instead of:
>> $this->pi_initPIflexForm();
>> $piFlexForm = $this->cObj->data['pi_flexform'];
>>
>>
>> $piFlexForm = t3lib_div::xml2array($flexForm);
> 
> If you do it in your own plugin, you should use pi_initPIflexForm, not 
> xml2array directly. If anything changes in plugin flexforms, 
> pi_initPIflexform will take that into account. This is the purpose of 
> API. Using API instead of inventing the wheel is a part of good extension.
> 




More information about the TYPO3-dev mailing list