fsi-open/datagrid-bundle — pull request #34 by norzechowicz (2013-12-01 21:09:04+00:00)
Title: Added datagrid yaml configuration builder

Ok so here it is. Basic yaml configuration builder.
To add fields to datagrid from yaml file you only need to create file with name of datagrid in ``Resources/config/datagrid`` folder.

For example if grid name is "news" and you have bundle with name FSiDemoBundle you need to create ``src/FSi/Bundles/DemoBundle/Resources/config/datagrid/news.yml`` file with following content:

```yml
columns:
id:
type: number
options:
label: Identity
title:
type: text
options:
label: Title
editable: true
actions:
type: action
options:
label: Actions
field_mapping: [id]
actions:
edit:
route_name: 'fsi_admin_crud_edit'
additional_parameters: {element: 'news'}
parameters_field_mapping: {id: 'id'}
```

This will add "id", "title" and "actions" columns to datagrid during pre_set_data event.

Of course you can disable this feature in application configuration.

```
# app/config/config.yml
fsi_data_grid:
yaml_configuration: false # by default this options is set to true
```

At the moment I think there is no need to build datagrid configuration from class (entity) metadata.