I want to show some fields of an object with SonataAdmin. One of these fields is an integer (status) in the database, but I don't want to show the integer, else a specific string depending on the value of this field.
public function configureListFields(ListMapper $listMapper)
{
$listMapper
->addIdentifier('name')
->add('notice')
->add('start')
->add('end')
->add('status')
;
}
Is it possible?
And a second question: in the same example, I want to add a field which is not mapped in the database (people) because this is calculated with data related with other objects.
public function configureListFields(ListMapper $listMapper)
{
$listMapper
->addIdentifier('name')
->add('notice')
->add('start')
->add('end')
->add('status')
->add('people')
;
}
Can I do this with Sonata Admin?
Thanks in advance.