Abhoryo/APYDataGridBundle — pull request #449 by npotier (2013-08-08 16:17:53+00:00)
Title: YAML file configuration and Command to generate YML from an entity

Hi,

After few talks about it, here is a pull request to add yml file configuration and a command to generate theses file from an entity.

YML file configuration
-------------------------------
- Like doctrine, YML file configuration for an entity must be placed in a special directory and have a special name MyBundle/Resources/config/grid/MyEntity.myGroup.grid.yml
- The YML file structure is the following:
````
# Resources/config/grid/MyEntity.myGroup.grid.yml
namespace\of\MyEntity
Source:
columns:
id: ~
myColumn1: ~
groupBy: ~
filterable: ~
Columns:
id:
filterable: true
visible: true
id: id
title: columnTitle
myColumn1: ....
...
````
- Annotation and YML Driver are both loaded in services.xml

YML Generation command
-------------------------------
- The command will allow you to generate a YML config file for an entity and a group:

```
php app/console apydatagrid:generate:grid --entity="MyBundle:MyEntity" --group="default"
```

- The file will be generated and written in src/MyBundle/Resources/config/grid/MyEntity.default.grid.yml.
- The generation of the file is based on a skeleton template stored in APYDataGrid/Resourses/skeleton/grid/grid.yml.twig.

Feel free to make any comments on this PR !