diff options
author | Sam Light <samlight1994@gmail.com> | 2025-08-26 21:32:19 +0100 |
---|---|---|
committer | Sam Light <samlight1994@gmail.com> | 2025-08-26 21:32:19 +0100 |
commit | 73d0a5d5b7076b5f30083f13927470c0728b43f5 (patch) | |
tree | 267e6613734a27a6f05435e9540a1f210055c098 /src/Columns | |
parent | d6f9f63c781a21c9763a71904730b27fb085ba28 (diff) |
Removed calls to call on Column
Diffstat (limited to 'src/Columns')
-rw-r--r-- | src/Columns/Column.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Columns/Column.php b/src/Columns/Column.php index e4c50a9..f0a65fe 100644 --- a/src/Columns/Column.php +++ b/src/Columns/Column.php @@ -132,10 +132,13 @@ class Column { protected function getContent(Model $row): string { - return $this->escape( - $this->slotFn?->call($this, $row, $this) ?? - $this->defaultSlot($row) - ); + $content = $this->slotFn === null ? $this->defaultSlot($ow) : ($this->slotFn)($row, $this); + return $this->escape($content); + } + + protected function getAttributes(Model $row): array + { + return $this->tdAttributes !== null ? ($this->tdAttributes)($row) : []; } public function view(Model $row): HtmlString |