From 6c662481bc6d304307c484e47bc5ec233990e5b1 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Wed, 17 Feb 2021 20:15:31 +0100 Subject: [PATCH] Remove a few obscure, unused features. * Removed support for row classification. Use of CSS is preferred. * Removed support for disabling/enabling columns via a property. Unset as needed. * Removed support for passing and inheriting a cell width by column. Header width suffices. --- models/GenericTable.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/models/GenericTable.php b/models/GenericTable.php index eb540c1..72d1d33 100644 --- a/models/GenericTable.php +++ b/models/GenericTable.php @@ -126,20 +126,12 @@ class GenericTable { foreach ($rows as $i => $row) { - $className = $i & 1 ? 'even' : 'odd'; - if (isset($options['row_classifier'])) - $className .= $options['row_classifier']($row); - $newRow = [ - 'class' => $className, 'cells' => [], ]; foreach ($options['columns'] as $column) { - if (isset($column['enabled']) && $column['enabled'] == false) - continue; - // The hard way? if (isset($column['parse'])) { @@ -207,7 +199,6 @@ class GenericTable // Append the cell to the row. $newRow['cells'][] = [ - 'width' => !empty($column['cell_width']) && is_int($column['cell_width']) ? $column['cell_width'] : null, 'value' => $value, ]; }