blob: 5eceb0416dd356812d8fe86ff28846f3f2724830 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<?php
namespace Dhtmlx\Connector\Data;
class JSONSchedulerDataItem extends SchedulerDataItem {
/*! 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['end_date'] = $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;
}
}
|