summaryrefslogtreecommitdiffstats
path: root/codebase/Data/CommonDataItem.php
diff options
context:
space:
mode:
authorKirylka <kirylanoshko@gmail.com>2015-04-07 12:27:53 +0300
committerKirylka <kirylanoshko@gmail.com>2015-04-07 12:27:53 +0300
commitf70c0f119d3aeacbb30fa3ad65ed56cda9640d97 (patch)
treef1769b415e145da3a836a897450c118f4995d05a /codebase/Data/CommonDataItem.php
parent9c5ae1267c676ca235efb8d78a206cb45d0d714c (diff)
downloadconnector-php-f70c0f119d3aeacbb30fa3ad65ed56cda9640d97.zip
connector-php-f70c0f119d3aeacbb30fa3ad65ed56cda9640d97.tar.gz
connector-php-f70c0f119d3aeacbb30fa3ad65ed56cda9640d97.tar.bz2
Webix grid support
Diffstat (limited to 'codebase/Data/CommonDataItem.php')
-rw-r--r--codebase/Data/CommonDataItem.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/codebase/Data/CommonDataItem.php b/codebase/Data/CommonDataItem.php
new file mode 100644
index 0000000..523cd08
--- /dev/null
+++ b/codebase/Data/CommonDataItem.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace DHTMLX\Connector\Data;
+/*! DataItem class for DataView component
+**/
+class CommonDataItem extends DataItem{
+ /*! return self as XML string
+ */
+ function to_xml(){
+ if ($this->skip) return "";
+ return $this->to_xml_start().$this->to_xml_end();
+ }
+
+ 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)."'";
+
+ return $str.">";
+ }
+} \ No newline at end of file