Skip to content

Commit 269df27

Browse files
committed
support addtional attributes pass as addAttributes
1 parent df0cca0 commit 269df27

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/Views/Column.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ class Column
1919
*/
2020
public ?string $text = null;
2121

22+
/**
23+
* @var array
24+
*/
25+
public array $attributes = [];
26+
2227
/**
2328
* @var bool
2429
*/
@@ -170,6 +175,18 @@ public function addClass(string $class): self
170175
return $this;
171176
}
172177

178+
/**
179+
* @param array $attributes
180+
*
181+
* @return $this
182+
*/
183+
public function addAttributes(array $attributes): self
184+
{
185+
$this->attributes = $attributes;
186+
187+
return $this;
188+
}
189+
173190
/**
174191
* @return Column
175192
*/
@@ -204,6 +221,14 @@ public function text(): ?string
204221
return $this->text;
205222
}
206223

224+
/**
225+
* @return array
226+
*/
227+
public function attributes(): array
228+
{
229+
return $this->attributes;
230+
}
231+
207232
/**
208233
* @param callable $callable
209234
*

0 commit comments

Comments
 (0)