Skip to content

Commit

Permalink
Add the option to add classes to the column
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Vermeiren committed Jul 10, 2020
1 parent 4716ebc commit 4899337
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,32 @@ class Column
*/
private $orderable;

/**
* @var array
*/
private $classes;

/**
* Column constructor
*
* @param string $name
* @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;
}

/**
Expand Down Expand Up @@ -87,4 +95,12 @@ public function isOrderable()
{
return $this->orderable;
}

/**
* @return array
*/
public function getClasses()
{
return $this->classes;
}
}

0 comments on commit 4899337

Please sign in to comment.