summaryrefslogtreecommitdiffstats
path: root/codebase/Dhtmlx/Connector/Data/JSONGanttDataItem.php
diff options
context:
space:
mode:
authorEgor <egor.26.93@gmail.com>2015-06-12 16:06:06 +0300
committerEgor <egor.26.93@gmail.com>2015-06-12 16:06:06 +0300
commit9abd184a386a2594398df9f5cd7bd6d5b9c240fc (patch)
tree6b237196dd4ae8bdee61093308f5c3dcdcc5c79e /codebase/Dhtmlx/Connector/Data/JSONGanttDataItem.php
parent5fbd0adda5155853e86001fad4c571008f09f01b (diff)
downloadconnector-php-9abd184a386a2594398df9f5cd7bd6d5b9c240fc.zip
connector-php-9abd184a386a2594398df9f5cd7bd6d5b9c240fc.tar.gz
connector-php-9abd184a386a2594398df9f5cd7bd6d5b9c240fc.tar.bz2
Updated structure. Added connectors.
Diffstat (limited to 'codebase/Dhtmlx/Connector/Data/JSONGanttDataItem.php')
-rw-r--r--codebase/Dhtmlx/Connector/Data/JSONGanttDataItem.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/codebase/Dhtmlx/Connector/Data/JSONGanttDataItem.php b/codebase/Dhtmlx/Connector/Data/JSONGanttDataItem.php
new file mode 100644
index 0000000..d5886fd
--- /dev/null
+++ b/codebase/Dhtmlx/Connector/Data/JSONGanttDataItem.php
@@ -0,0 +1,26 @@
+<?php
+namespace Dhtmlx\Connector\Data;
+
+class JSONGanttDataItem extends GanttDataItem {
+ /*! return self as XML string
+ */
+ function to_xml(){
+ if ($this->skip) return "";
+
+ $obj = array();
+ $obj['id'] = $this->get_id();
+ $obj['start_date'] = $this->data[$this->config->text[0]["name"]];
+ $obj[$this->config->text[1]["name"]] = $this->data[$this->config->text[1]["name"]];
+ $obj['text'] = $this->data[$this->config->text[2]["name"]];
+ for ($i=3; $i<sizeof($this->config->text); $i++){
+ $extra = $this->config->text[$i]["name"];
+ $obj[$extra]=$this->data[$extra];
+ }
+
+ if ($this->userdata !== false)
+ foreach ($this->userdata as $key => $value)
+ $obj[$key]=$value;
+
+ return $obj;
+ }
+} \ No newline at end of file