setFormatter(ColumnFormatter::template(
'
'
));
$columns->add(Column::searchable('name', 'Name', 'left', '25%'));
$columns->add(Column::searchable('text', 'Text', 'left', '40%'));
$columns->add(Column::searchable('stichwoerter', 'Stichwörter', 'left', '15%'));
$columns->add(Column::searchable('projekt', 'Projekt', 'center', '15%'));
$columns->add($menu);
}
/**
* @param SelectQuery $query
*
* @return void
*/
public function configureQuery(SelectQuery $query)
{
$query
->cols([
't.id',
't.name',
't.text',
't.stichwoerter',
't.projekt',
])
->from('textvorlagen AS t');
}
/**
* @param FeatureCollection $features
*
* @return void
*/
public function configureFeatures(FeatureCollection $features)
{
parent::configureFeatures($features);
$features->set(new ColumnFilterFeature());
$features->set(new TableStylingFeature(true));
}
}