4 Commits

Author SHA1 Message Date
9e7c83b680 fix View Json Table 2024-08-07 14:31:07 +03:00
b374744261 Merge branch 'master' of https://git.itguild.info/ItGuild/tables 2024-08-07 14:21:00 +03:00
c6918c85b3 fix View Jason Table 2024-08-07 14:10:26 +03:00
d98ddded07 fix view json table 2024-08-07 12:43:14 +03:00

View File

@ -13,7 +13,7 @@ class ViewJsonTable extends JasonTable
private array $dataJson;
public function __construct($json)
{
$this->beforePrintCell = false;
$this->beforePrintCell = [];
$this->json = $json;
$this->data = json_decode($this->json, true);
$this->dataJson = $this->data['data'];
@ -28,9 +28,9 @@ class ViewJsonTable extends JasonTable
$paramsStr = $this->createParams($this->data['meta']['params']);
//Хук перед выводом ячейки
if (isset($this->beforePrintTable)){
$hook = $this->beforePrintTable;
$this->html = $hook();
if (isset($this->beforePrintHook)){
$hook = $this->beforePrintHook;
$this->html .= $hook();
}
$this->html .= "<table $paramsStr>";
@ -65,8 +65,8 @@ class ViewJsonTable extends JasonTable
{
$this->html .= "</table>";
if(isset($this->afterPrintTable)){
$hookAfter = $this->afterPrintTable;
if(isset($this->afterPrintHook)){
$hookAfter = $this->afterPrintHook;
$this->html .= $hookAfter();
}
}