[TYPO3-dev] $this->cObj->data['pi_flexform'] empty?

Steffen Müller typo3 at t3node.com
Tue Dec 2 22:31:54 CET 2008


Hi.

On 01.12.2008 16:59 Henjo Hoeksma wrote:
> 
>     function init(){
>         $this->pi_loadLL();
>         $this->pi_initPIflexform();
>         $this->lConf = array();
>         $piFlexForm = $this->cObj->data['pi_flexform'];
>         $index = $GLOBALS['TSFE']->sys_language_uid;
>         $sDef = current($piFlexForm['data']);
>         $lDef = array_keys($sDef);
>         foreach ( $piFlexForm['data'] as $sheet => $data )
>             foreach ($data[$lDef[$index]] as $key => $val )
>             $this->lConf[$key] =
> $this->pi_getFFvalue($piFlexForm,$key,$sheet,$lDef[$index]);
>     }
> 

I just tried the code and after fixing some minor things it worked :

$this->pi_initPIflexForm();
                   ^^^
$this->lConf = array();
$piFlexForm = $this->cObj->data['pi_flexform'];
$index = $GLOBALS['TSFE']->sys_language_uid;
$sDef = current($piFlexForm['data']);
$lDef = array_keys($sDef);
foreach ( $piFlexForm['data'] as $sheet => $data ) {
                                                  ^^^
    foreach ($data[$lDef[$index]] as $key => $val ) {
                                                   ^^^
        $this->lConf[$key] =
$this->pi_getFFvalue($piFlexForm,$key,$sheet,$lDef[$index]);
    }
}
^^


-- 
cheers,
Steffen

http://www.t3node.com/




More information about the TYPO3-dev mailing list