IsSpam) { $classes[] = 'spam'; } $attributes = array( 'class' => implode(' ', $classes), 'data-id' => $record->ID, 'data-class' => $record->ClassName, ); return FormField::create_tag( 'tr', $attributes, $content ); } }