summaryrefslogtreecommitdiffstats
path: root/codebase/Dhtmlx/Connector/Data/JSONTreeCommonDataItem.php
diff options
context:
space:
mode:
Diffstat (limited to 'codebase/Dhtmlx/Connector/Data/JSONTreeCommonDataItem.php')
-rw-r--r--codebase/Dhtmlx/Connector/Data/JSONTreeCommonDataItem.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/codebase/Dhtmlx/Connector/Data/JSONTreeCommonDataItem.php b/codebase/Dhtmlx/Connector/Data/JSONTreeCommonDataItem.php
new file mode 100644
index 0000000..3bae29a
--- /dev/null
+++ b/codebase/Dhtmlx/Connector/Data/JSONTreeCommonDataItem.php
@@ -0,0 +1,32 @@
+<?php
+namespace Dhtmlx\Connector\Data;
+
+class JSONTreeCommonDataItem extends TreeCommonDataItem {
+
+ /*! return self as XML string
+ */
+ function to_xml_start(){
+ if ($this->skip) return false;
+
+ $data = array( "id" => $this->get_id() );
+ for ($i=0; $i<sizeof($this->config->text); $i++){
+ $extra = $this->config->text[$i]["name"];
+ if (isset($this->data[$extra]))
+ $data[$extra]=$this->data[$extra];
+ }
+
+ if ($this->userdata !== false)
+ foreach ($this->userdata as $key => $value)
+ $data[$key]=$value;
+
+ if ($this->kids === true)
+ $data[Connector::$kids_var] = 1;
+
+ return $data;
+ }
+
+ function to_xml_end(){
+ return "";
+ }
+
+} \ No newline at end of file