| Total Complexity | 8 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 7 | class Datatable extends Component |
||
| 8 | { |
||
| 9 | public $beautify; |
||
| 10 | public $buttons; |
||
| 11 | public $id; |
||
| 12 | public $bordered; |
||
| 13 | public $hoverable; |
||
| 14 | public $condensed; |
||
| 15 | public $heads; |
||
| 16 | public $footer; |
||
| 17 | |||
| 18 | 2 | public function __construct( |
|
| 19 | $beautify = true, $id, |
||
| 20 | $bordered = true, $hoverable = true, $condensed = false, |
||
| 21 | $heads, $footer = false, $buttons = false |
||
| 22 | ) { |
||
| 23 | 2 | $this->id = $id; |
|
| 24 | 2 | $this->beautify = $beautify; |
|
| 25 | 2 | $this->bordered = $bordered; |
|
| 26 | 2 | $this->hoverable = $hoverable; |
|
| 27 | 2 | $this->condensed = $condensed; |
|
| 28 | 2 | $this->heads = json_decode(json_encode($heads)); |
|
| 29 | 2 | $this->footer = $footer; |
|
| 30 | 2 | $this->buttons = $buttons; |
|
| 31 | 2 | } |
|
| 32 | |||
| 33 | 1 | public function border() |
|
| 34 | { |
||
| 35 | 1 | return ($this->bordered) ? 'table-bordered' : null; |
|
| 36 | } |
||
| 37 | |||
| 38 | 1 | public function hover() |
|
| 39 | { |
||
| 40 | 1 | return ($this->hoverable) ? 'table-hover' : null; |
|
| 41 | } |
||
| 42 | |||
| 43 | 1 | public function condense() |
|
| 44 | { |
||
| 45 | 1 | return ($this->condensed) ? 'table-condensed' : null; |
|
| 46 | } |
||
| 47 | |||
| 48 | 1 | public function render() |
|
| 51 | } |
||
| 52 | } |
||
| 53 |