silverstripe-comments/code/admin/CommentsGridField.php
2015-04-21 09:28:11 +12:00

22 lines
371 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
);
}
}