I'm using Sonata Admin and I have a question about the inline edition.
I know there is an option ->add('adresse', null, array('editable' => true))
for edit directly in the table all informations.
But in this case, adresse is a text field. How can I do that with, for example an entity field? Example :
->add('agent', 'entity', array(
'class' => 'CrmBundle:User',
'query_builder' => function(EntityRepository $er) {
return $er->createQueryBuilder('u')
->where('u.type = ?1 ')
->groupBy('u.id')
->orderBy('u.id', 'ASC')
->setParameters(array(1 => 'Agent'));
}
))
I need to have the possibility to change entity field directly in the table. Any ideas?