11 public $custom_fields;
20 $custom_fields = array())
22 $this->custom_fields = $custom_fields;
33 foreach ($xmlElement->children() as $field) {
34 $this->custom_fields[trim($field->name)] = $field->type;
46 $xml =
new SimpleXMLElement(
"<?xml version=\"1.0\"?><custom_fields></custom_fields>");
47 if (isset($this->custom_fields)) {
48 foreach ($this->custom_fields as $index => $type) {
49 $field = $xml->addChild(
"field");
50 $field->addChild(
"name", $index);
51 $field->addChild(
"type", $type);
66 $xml = $this->
toXML();
81 if (isset($this->custom_fields)) {
82 foreach ($this->custom_fields as $index => $type) {
83 $customfields .= $index .
"=" . $type .
", ";
85 $customfields = rtrim($customfields,
', ');
88 return "CustomFields = {" . $customfields .
"}";