Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
9e7c83b680 | |||
b374744261 | |||
c6918c85b3 | |||
d98ddded07 |
@ -13,7 +13,7 @@ class ViewJsonTable extends JasonTable
|
|||||||
private array $dataJson;
|
private array $dataJson;
|
||||||
public function __construct($json)
|
public function __construct($json)
|
||||||
{
|
{
|
||||||
$this->beforePrintCell = false;
|
$this->beforePrintCell = [];
|
||||||
$this->json = $json;
|
$this->json = $json;
|
||||||
$this->data = json_decode($this->json, true);
|
$this->data = json_decode($this->json, true);
|
||||||
$this->dataJson = $this->data['data'];
|
$this->dataJson = $this->data['data'];
|
||||||
@ -28,9 +28,9 @@ class ViewJsonTable extends JasonTable
|
|||||||
$paramsStr = $this->createParams($this->data['meta']['params']);
|
$paramsStr = $this->createParams($this->data['meta']['params']);
|
||||||
|
|
||||||
//Хук перед выводом ячейки
|
//Хук перед выводом ячейки
|
||||||
if (isset($this->beforePrintTable)){
|
if (isset($this->beforePrintHook)){
|
||||||
$hook = $this->beforePrintTable;
|
$hook = $this->beforePrintHook;
|
||||||
$this->html = $hook();
|
$this->html .= $hook();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->html .= "<table $paramsStr>";
|
$this->html .= "<table $paramsStr>";
|
||||||
@ -65,8 +65,8 @@ class ViewJsonTable extends JasonTable
|
|||||||
{
|
{
|
||||||
$this->html .= "</table>";
|
$this->html .= "</table>";
|
||||||
|
|
||||||
if(isset($this->afterPrintTable)){
|
if(isset($this->afterPrintHook)){
|
||||||
$hookAfter = $this->afterPrintTable;
|
$hookAfter = $this->afterPrintHook;
|
||||||
$this->html .= $hookAfter();
|
$this->html .= $hookAfter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user