Skip to content

Commit 4899337

Browse files
author
Tony Vermeiren
committed
Add the option to add classes to the column
1 parent 4716ebc commit 4899337

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/Column.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,32 @@ class Column
3636
*/
3737
private $orderable;
3838

39+
/**
40+
* @var array
41+
*/
42+
private $classes;
43+
3944
/**
4045
* Column constructor
4146
*
4247
* @param string $name
4348
* @param string $dbField
4449
* @param bool $searchable
4550
* @param bool $orderable
51+
* @param null|array $classes
4652
*/
4753
public function __construct(
4854
$name,
4955
$dbField,
5056
$searchable,
51-
$orderable
57+
$orderable,
58+
$classes = []
5259
) {
5360
$this->name = $name;
5461
$this->dbField = $dbField;
5562
$this->searchable = $searchable;
5663
$this->orderable = $orderable;
64+
$this->classes = $classes;
5765
}
5866

5967
/**
@@ -87,4 +95,12 @@ public function isOrderable()
8795
{
8896
return $this->orderable;
8997
}
98+
99+
/**
100+
* @return array
101+
*/
102+
public function getClasses()
103+
{
104+
return $this->classes;
105+
}
90106
}

0 commit comments

Comments
 (0)