Closed tristanbes closed 4 years ago
Why not, PR welcomed :)
Actually it should be as easy as simply using any other form type (but as it's not a core form type, EasyAdminBundle does not provide an alias, so you have to use the FQCN).
- type (optional): the Symfony Form type used to render this field. You can use the short type name (e.g. email) instead of its fully qualified class name (e.g. Symfony\Component\Form\Extension\Core\Type\EmailType) even if your application runs on Symfony 3 (the needed conversion is done internally by the bundle). The allowed values are:
- Any of the Symfony Form types.
- Any of the custom EasyAdmin form types: easyadmin_autocomplete (they are explained later in this chapter).
- type_options (optional), a hash with the options passed to the Symfony Form type used to render the field.
About the EnumType provided in this package: https://github.com/Elao/PhpEnums#symfony-form-component
would not it be the case to have an EnumTypeGuesser?
Sure. And you already opened #45 :)
But it should probably not be enough to close this issue. Showing a simple example with custom options and redirecting on the official EasyAdmin documentation still is relevant. Also, perhaps provide/showcase simple templates for list & show views rendering of enums and array of enums.
Closing as there is no activity here. If anyone is willing to enhance the documentation or open a PR to improve integration with EasyAdmin, please do.
Hi
a section on "'how to use with easy admin" could be nice when editing entities inside easy admin bundle.