コード例 #1
0
 protected function parseFieldGroupConfig($id, $config)
 {
     $FGCNode = $this->XPath->evaluate('//FieldGroupConfig[@id="' . $id . '"]')->item(0);
     if ($FGCNode === null) {
         throw new InvalidFieldGroupConfigException('Invalid field group config structure.');
     }
     $FG = new FieldGroup($FGCNode, $this->XPath, $this->lang, $this->rootConfigID === $id, $this->attributes, $this->coefficients);
     $FG->parse();
     $config = array_merge_recursive($config, $FG->toArray());
     if ($FG->hasChildGroups() === true) {
         foreach ($FG->getChildGroups() as $chg) {
             $config = $this->parseFieldGroupConfig($chg, $config);
         }
     }
     return $config;
 }