From 4899337b637d926b421a9bab3db7bc6450c6db30 Mon Sep 17 00:00:00 2001 From: Tony Vermeiren Date: Fri, 10 Jul 2020 11:27:11 +0200 Subject: [PATCH] Add the option to add classes to the column --- src/Column.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Column.php b/src/Column.php index 657be9e..f8d83e8 100644 --- a/src/Column.php +++ b/src/Column.php @@ -36,6 +36,11 @@ class Column */ private $orderable; + /** + * @var array + */ + private $classes; + /** * Column constructor * @@ -43,17 +48,20 @@ class Column * @param string $dbField * @param bool $searchable * @param bool $orderable + * @param null|array $classes */ public function __construct( $name, $dbField, $searchable, - $orderable + $orderable, + $classes = [] ) { $this->name = $name; $this->dbField = $dbField; $this->searchable = $searchable; $this->orderable = $orderable; + $this->classes = $classes; } /** @@ -87,4 +95,12 @@ public function isOrderable() { return $this->orderable; } + + /** + * @return array + */ + public function getClasses() + { + return $this->classes; + } }