SonataAdminBundle: "The option "field_options" does not exist" in Datagrid Mapper
It seems that configured option ‘field_option’ in configureDatagridFilters is no more recognized in [entityname]Admin class. Thi is my code
$datagridMapper
->add('id')
->add('itemType', 'doctrine_orm_choice', array('label' => 'Tipo item',
'field_options' => array(
'required' => FALSE,
'choices' => array("image" => "Immagine",
"video-youtube" => "Video Youtube",
"text" => "Testo")
),
'field_type' => 'choice')
)
class DatagridMapper extends BaseMapper {
public function add($name, $type = null, array $filterOptions = array(), $fieldType = null, $fieldOptions = null)
{
if (is_array($fieldOptions)) {
$filterOptions['field_options'] = $fieldOptions;
}
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 25 (13 by maintainers)
La Sua mail è stata correttamente ricevuta. Riceverà una risposta nel più breve tempo possibile.
Cordiali saluti.