diff --git a/src/ListJsonTable.php b/src/ListJsonTable.php index 10960c7..74e3218 100644 --- a/src/ListJsonTable.php +++ b/src/ListJsonTable.php @@ -119,7 +119,7 @@ class ListJsonTable foreach ($row as $key => $ceil) { if ($this->issetColumn($key) and $this->is_fillable($key)) { if($this->beforePrintCell) { - $ceil = $this->setCustomHandler($this->beforePrintCell, $key, $ceil); + $ceil = $this->getCustomCeil($key, $ceil); } $this->html .= "" . $ceil . ""; } @@ -311,9 +311,9 @@ class ListJsonTable } } - public function setCustomHandler(Closure|array $handler, string $key, string $ceil) + public function getCustomCeil(string $key, string $ceil) { - if (is_array($handler)) { + if (is_array($this->beforePrintCell)) { foreach ($this->beforePrintCell as $column => $closure) { if ($key == $column) { $hook = $closure; @@ -324,7 +324,7 @@ class ListJsonTable $hook = $this->beforePrintCell; $ceil = $hook($key, $ceil); } - return $ceil; + return $ceil; } } \ No newline at end of file