/** * Transforms FormElement_List into a SimpleXMLElement * * @param SimpleXMLElement $root The node to which the FormElement is attached (passed by reference) * @param array &$xmlMapping The correpondance between real ids and xml IDs */ public function exportToXml(SimpleXMLElement $root, &$xmlMapping) { parent::exportToXML($root, $xmlMapping); if ($this->getBind() && $this->shouldBeBindXML()) { $child = $root->addChild('bind'); $bf = new Tracker_FormElement_Field_List_BindFactory(); $child->addAttribute('type', $bf->getType($this->getBind())); $this->getBind()->exportToXML($child, $xmlMapping); } }