diff options
author | Egor <egor.26.93@gmail.com> | 2015-06-12 16:06:06 +0300 |
---|---|---|
committer | Egor <egor.26.93@gmail.com> | 2015-06-12 16:06:06 +0300 |
commit | 9abd184a386a2594398df9f5cd7bd6d5b9c240fc (patch) | |
tree | 6b237196dd4ae8bdee61093308f5c3dcdcc5c79e /codebase/Dhtmlx/Connector/Data/GanttDataItem.php | |
parent | 5fbd0adda5155853e86001fad4c571008f09f01b (diff) | |
download | connector-php-9abd184a386a2594398df9f5cd7bd6d5b9c240fc.zip connector-php-9abd184a386a2594398df9f5cd7bd6d5b9c240fc.tar.gz connector-php-9abd184a386a2594398df9f5cd7bd6d5b9c240fc.tar.bz2 |
Updated structure. Added connectors.
Diffstat (limited to 'codebase/Dhtmlx/Connector/Data/GanttDataItem.php')
-rw-r--r-- | codebase/Dhtmlx/Connector/Data/GanttDataItem.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/codebase/Dhtmlx/Connector/Data/GanttDataItem.php b/codebase/Dhtmlx/Connector/Data/GanttDataItem.php new file mode 100644 index 0000000..61acdc2 --- /dev/null +++ b/codebase/Dhtmlx/Connector/Data/GanttDataItem.php @@ -0,0 +1,27 @@ +<?php +namespace Dhtmlx\Connector\Data; + +/*! DataItem class for Gantt component +**/ +class GanttDataItem extends DataItem { + + /*! return self as XML string + */ + function to_xml(){ + if ($this->skip) return ""; + + $str="<task id='".$this->get_id()."' >"; + $str.="<start_date><![CDATA[".$this->data[$this->config->text[0]["name"]]."]]></start_date>"; + $str.="<".$this->config->text[1]["name"]."><![CDATA[".$this->data[$this->config->text[1]["name"]]."]]></".$this->config->text[1]["name"].">"; + $str.="<text><![CDATA[".$this->data[$this->config->text[2]["name"]]."]]></text>"; + for ($i=3; $i<sizeof($this->config->text); $i++){ + $extra = $this->config->text[$i]["name"]; + $str.="<".$extra."><![CDATA[".$this->data[$extra]."]]></".$extra.">"; + } + if ($this->userdata !== false) + foreach ($this->userdata as $key => $value) + $str.="<".$key."><![CDATA[".$value."]]></".$key.">"; + + return $str."</task>"; + } +}
\ No newline at end of file |