Skip to content

"The option "field_options" does not exist" in Datagrid Mapper #2148

@dunkelberg

Description

@dunkelberg

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;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions