public function getNode($xml) { $node = parent::getNode($xml); if ($this->true) { $trueNode = $xml->createElement('true'); $node->appendChild($trueNode); $trueNode->appendChild($this->true->getNode($xml)); } if ($this->false) { $falseNode = $xml->createElement('false'); $node->appendChild($falseNode); $falseNode->appendChild($this->false->getNode($xml)); } return $node; $items = $xml->createElement('items'); $items->appendChild($node); return $items; }
public function getNode($xml) { $node = parent::getNode($xml); $items = new AppBuilderAPIElement('items'); $items = $items->getNode($xml); foreach ($this->options as $option) { $optionNode = new AppBuilderAPIElement('option'); foreach ($option as $k => $v) { $optionNode->setAttribute($k, $v); } $optionNode = $optionNode->getNode($xml); $items->appendChild($optionNode); } $node->appendChild($items); return $node; }