|
|
@@ -126,7 +126,7 @@ class DataTable extends BaseContainer implements \ThurData\Servers\KerioEmail\Co
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- public function setData($data = [])
|
|
|
+ public function setData(array $data = [])
|
|
|
{
|
|
|
$this->recordsSet = $data;
|
|
|
|
|
|
@@ -135,7 +135,7 @@ class DataTable extends BaseContainer implements \ThurData\Servers\KerioEmail\Co
|
|
|
|
|
|
protected function getCount()
|
|
|
{
|
|
|
- return count($this->recordsSet->records);
|
|
|
+ return count($this->recordsSet['records']);
|
|
|
}
|
|
|
|
|
|
protected function getRecords()
|
|
|
@@ -158,7 +158,7 @@ class DataTable extends BaseContainer implements \ThurData\Servers\KerioEmail\Co
|
|
|
$this->loadHtml();
|
|
|
}
|
|
|
|
|
|
- $this->setData($this->dataProvider->getData($this->columns));
|
|
|
+ $this->setData((array)$this->dataProvider->getData($this->columns));
|
|
|
}
|
|
|
|
|
|
protected function parseDataRecords()
|
|
|
@@ -169,9 +169,9 @@ class DataTable extends BaseContainer implements \ThurData\Servers\KerioEmail\Co
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- foreach ($this->recordsSet->records as $key => $row)
|
|
|
+ foreach ($this->recordsSet['records'] as $key => $row)
|
|
|
{
|
|
|
- $this->recordsSet->records[$key] = $this->replaceRowData($row, $replacementFunctions);
|
|
|
+ $this->recordsSet['records'][$key] = $this->replaceRowData($row, $replacementFunctions);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -210,9 +210,11 @@ class DataTable extends BaseContainer implements \ThurData\Servers\KerioEmail\Co
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
|
+ if (is_object($row))
|
|
|
+ {
|
|
|
+ $row->$colName = $value;
|
|
|
+ }
|
|
|
|
|
|
- $row->$colName = $value;
|
|
|
-
|
|
|
return $this;
|
|
|
}
|
|
|
|