Refactor generic tables and page index classes #26
@ -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,
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user