symfony2admingenerator/GeneratorBundle — pull request #78 by ksn135 (2014-12-21 14:50:17+00:00)
Title: [Feature] Add CSS class block on each row

This is very nice feature. For example, you wanna mark with different background and foreground colour some of the rows in result table, based on your custom criteria. After this patch you can do it in a very simple way.
Just add the following code to your ```rows.html.twig```:
```
{% block list_row_class %}{% if Object.needsToDrawInRed %}make-it-red{% endif %}{% endblock list_row_class %}
```
Also don't forget to add CSS rule:
```
.make-it-red td {
background: red;
color: white;
}
```
Or even you can generate CSS class(es) for table row dynamically from your object's function call:
```
{% block list_row_class %}{{ Object.getCssClassForTableRow }}{% endblock list_row_class %}
```