src/Form/Type/EasyAdminFormType.php
public function configureOptions(OptionsResolver $resolver)
    {
        $resolver
            ->setDefaults([
                'allow_extra_fields' => true,
                'data_class' => function (Options $options, $dataClass) {
                    if (null !== $dataClass) {
                        return $dataClass;
                    }

                    $entityConfig = $this->configManager->getEntityConfig($options['entity']);

                    return $entityConfig['class'];
                },
            ])
            ->setRequired(['entity', 'view'])
            ->setNormalizer('attr', $this->getAttributesNormalizer());
    }
public function configureOptions(OptionsResolver $resolver)
    {
        $resolver
            ->setDefaults([
                'allow_extra_fields' => true,
                'data_class' => function (Options $options, $dataClass) {
                    if (null !== $dataClass) {
                        return $dataClass;
                    }

                    $entityConfig = $this->configManager->getEntityConfig($options['entity']);

                    return $entityConfig['class'];
                },
            ])
            ->setRequired(['entity', 'view'])
            ->setNormalizer('attr', $this->getAttributesNormalizer());
    }
{@inheritdoc}