Open ArmandArthur opened 1 year ago
I have the same problem. any update please?
I have this same issue.. any help?
Will solve your problem
public static function new(string $propertyName, ?string $label = null)
{
return (new self())
->setProperty($propertyName)
->setLabel($label)
->setTemplatePath('admin/field/your_twig.html.twig')
->setFormType(EntityType::class)
->setFormTypeOptions([
'class' => YourClass::class,
])
->addCssClass('field-integer')
;
}
That works, thanks
I had the same error message when making a custom filter. My use case was that I wanted to override the apply method with a rather complex query, so I copied the EntityFilter to a new class and changed only the apply method.
I received an error that the class
option did not exist when I tried the solution above. After looking at the available options I stumbled upon this fix. I added this line to the new method which had been copied over from the EntityFilter.
->setFormTypeOption('value_type_options', ['class' => YourClass::class])
Describe the bug When i click on "Filters" menu, a popup appear. But display the error: " An error has occurred resolving the options of the form "Symfony\Bridge\Doctrine\Form\Type\EntityType": The required option "class" is missing. "
Version easy admin 4.5.0
Do i miss something or it's a bug? I'm with Symfony 6.2.