Opifer/CrudBundle — pull request #2 by rvanlaarhoven (2014-11-12 14:10:34+00:00)
Title: Cell type proposal

@dylanschoenmakers ,

A first proposal of how we could implement Cell types.

An example of the way this works in a Grid:

```php
public function buildGrid(DatagridBuilderInterface $builder)
{
$builder
->addColumn('enabled', new LabelCell(), ['label' => 'Activated'])
->addColumn('username', new PropertyCell(), ['label' => 'User name'])
->addColumn('email', new PropertyCell(), ['label' => 'Email address'])
->addColumn('createdAt', new DateTimeCell(), ['label' => 'Created'])
;
}
```

Where `PropertyCell` is a base cell (not abstract in this case, but we could change it to abstract).
Its `getData` method uses Symfony's [PropertyAccess](http://symfony.com/doc/current/components/property_access/introduction.html) component that works with `arrays`, `getters`, `issers`, `hassers`.