3 Commits
0.1 ... 0.1.2

Author SHA1 Message Date
4bdd883d67 fix to psr4 2024-07-15 16:25:03 +03:00
f9fc6b9f17 tag 2024-07-15 15:54:11 +03:00
338555d62c fix link 2024-07-15 15:49:12 +03:00
9 changed files with 5 additions and 5 deletions

View File

@ -25,7 +25,8 @@ class ListJsonTable
public function __construct(string $json) public function __construct(string $json)
{ {
$this->beforePrintCell = false; $this->beforePrintCell = false;
$this->beforePrint = function (){}; $this->beforePrint = function () {
};
$this->json = $json; $this->json = $json;
$this->data = json_decode($this->json, true); $this->data = json_decode($this->json, true);
$this->baseUrl = $this->data['meta']['baseUrl'] ?? ''; $this->baseUrl = $this->data['meta']['baseUrl'] ?? '';
@ -69,7 +70,7 @@ class ListJsonTable
foreach ($this->data['data'] as $col) { foreach ($this->data['data'] as $col) {
$this->html .= "<tr>"; $this->html .= "<tr>";
$this->count += 1; $this->count += 1;
$this->html .= '<td><a href=' . $this->baseUrl . "/form-item/" . $col["id"] . '>' . $this->count . '</a></td>'; $this->html .= '<td><a href=' . $this->baseUrl . "/" . $col["id"] . '>' . $this->count . '</a></td>';
foreach ($col as $key => $row) { foreach ($col as $key => $row) {
if ($this->issetColumn($key) and $this->is_fillable($key)) { if ($this->issetColumn($key) and $this->is_fillable($key)) {
if ($this->beforePrintCell) { if ($this->beforePrintCell) {
@ -126,8 +127,7 @@ class ListJsonTable
if (in_array($column, $this->data['meta']['fillable'])) { if (in_array($column, $this->data['meta']['fillable'])) {
return true; return true;
} }
} } else {
else{
return true; return true;
} }