symfony2admingenerator/AdmingeneratorGeneratorBundle — pull request #790 by Restless-ET (2014-09-09 13:37:47+00:00)
Title: (v1.0) Re-organized ExcelBuilderAction.php.twig

Added a ```getValueForCell``` protected function so that extending the values format for the cells will be easier.

For instance if we need to format the value of a field which we know it's a currency, we can easily extends this method and add those special cases. E.g.:
```php
protected function getValueForCell($field, $rowData)
{
switch($field) {
case 'price':
case 'productionCost':
$getter = 'get'.ucfirst($field);
$data = number_format($rowData->$getter(), 2, ',', '.');
break;
default:
$data = parent::getValueForCell($field, $rowData);
break;
}
return $data;
}
```

I don't know if this is the best example, but this can also be used to render boolean field with some text other than ```TRUE/FALSE```.