mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
22 lines
371 B
PHP
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
|
|
);
|
|
}
|
|
} |