summaryrefslogtreecommitdiffstats
path: root/codebase/Dhtmlx/Connector/Data/TreeCommonDataItem.php
diff options
context:
space:
mode:
Diffstat (limited to 'codebase/Dhtmlx/Connector/Data/TreeCommonDataItem.php')
-rwxr-xr-xcodebase/Dhtmlx/Connector/Data/TreeCommonDataItem.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/codebase/Dhtmlx/Connector/Data/TreeCommonDataItem.php b/codebase/Dhtmlx/Connector/Data/TreeCommonDataItem.php
new file mode 100755
index 0000000..e43fbec
--- /dev/null
+++ b/codebase/Dhtmlx/Connector/Data/TreeCommonDataItem.php
@@ -0,0 +1,33 @@
+<?php
+namespace Dhtmlx\Connector\Data;
+
+class TreeCommonDataItem extends CommonDataItem {
+
+ protected $kids=-1;
+
+ function to_xml_start(){
+ $str="<item id='".$this->get_id()."' ";
+ for ($i=0; $i < sizeof($this->config->text); $i++){
+ $name=$this->config->text[$i]["name"];
+ $str.=" ".$name."='".$this->xmlentities($this->data[$name])."'";
+ }
+
+ if ($this->userdata !== false)
+ foreach ($this->userdata as $key => $value)
+ $str.=" ".$key."='".$this->xmlentities($value)."'";
+
+ if ($this->kids === true)
+ $str .=" ".Connector::$kids_var."='1'";
+
+ return $str.">";
+ }
+
+ function has_kids(){
+ return $this->kids;
+ }
+
+ function set_kids($value){
+ $this->kids=$value;
+ }
+
+} \ No newline at end of file