Although the result is not beautiful. I've solved the problem just adding 'array' type to 'sizes' field on configureShowFields and configureListFields methods. The result shows sizes field like [0 => 38] [1 => 40] [2 => 42] [3 => 43] [4 => 45] [5 => 46] and I would like it as similar to 38, 40, 42, 43, 45, 46
The change I've made:
/**
* @param ListMapper $listMapper
*/
protected function configureListFields(ListMapper $listMapper)
{
$listMapper
->add('id')
->add('sizes', 'array') // I've just added array type
->add('_action', 'actions', array(
'actions' => array(
'show' => array(),
'edit' => array(),
'delete' => array(),
)
))
;
}
/**
* @param ShowMapper $showMapper
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$showMapper
->add('id')
->add('sizes', 'array') // I've just added array type
;
}
I would appreciate a better way. Thanks
Types availables on Sonata Admin Bundle Forms