菜单

Flexform配置类似inline效果

2010年07月20日 - typo3

====== Flexform ======


    LLL:EXT:cms/locallang_ttc.xml:media.additionalOptions
    array
    
1
array LLL:EXT:cms/locallang_ttc.xml:media.params select LLL:EXT:cms/locallang_ttc.xml:media.params.autoPlay autoPlay LLL:EXT:cms/locallang_ttc.xml:media.params.loop loop select LLL:EXT:cms/locallang_ttc.xml:media.params.on 1 LLL:EXT:cms/locallang_ttc.xml:media.params.off 0 input 16 array LLL:EXT:cms/locallang_ttc.xml:media.params.customEntry text 6 60

How to get:

$this->pi_initPIflexForm(); //Init FlexForm configuration for plugin
$this->lConf = array(); // Setup our storage array...
// Assign the flexform data to a local variable for easier access
$piFlexForm = $this->cObj->data ['pi_flexform'];
// Traverse the entire array based on the language...
// and assign each configuration option to $this->lConf array...
if (!empty($piFlexForm['data'])) {
    foreach ($piFlexForm['data'] as $sheet => $data) {
        if (!empty($data)) {
            foreach ($data as $lang => $value) {
                if (!empty($value)) {
                    foreach ($value as $key => $val) {
                        if ($key == 'multiOptions') {
                            foreach ($val['el'] as $mmKey => $mmVal) {
                                foreach ($mmVal as $mmListKey => $mmListVal) {
                                    if ($mmListKey == 'container1') {
                                        foreach ($mmListVal['el'] as $keyshow => $keyval) {
                                            $this->container1[$keyshow][] = $keyval['vDEF'];
                                        }
                                    }
                                    if ($mmListKey == 'container2') {
                                        foreach ($mmListVal['el'] as $keyshow => $keyval) {
                                            $this->container2[$keyshow][] = $keyval['vDEF'];
                                        }
                                    }
                                }
                            }
                        } else {
                            $this->lConf[$key] = $this->pi_getFFvalue($piFlexForm, $key, $sheet);
                        }

                    }
                }
            }
        }
    }
}

发表评论

电子邮件地址不会被公开。 必填项已用*标注