silverstripe-comments/code/admin/CommentsGridField.php
2016-02-19 13:48:25 +13:00

25 lines
474 B
PHP

<?php
class CommentsGridField extends GridField
{
/**
* {@inheritdoc}
*/
protected function newRow($total, $index, $record, $attributes, $content)
{
if (!isset($attributes['class'])) {
$attributes['class'] = '';
}
if ($record->IsSpam) {
$attributes['class'] .= ' spam';
}
return FormField::create_tag(
'tr',
$attributes,
$content
);
}
}