Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2 integration with easyadmin #230

Open
hafkenscheid opened this issue Apr 1, 2024 · 2 comments
Open

v2 integration with easyadmin #230

hafkenscheid opened this issue Apr 1, 2024 · 2 comments

Comments

@hafkenscheid
Copy link

Hello,

I am having issues integrating version 2 with easyadmin (version 1 worked like a charm).
Anyone already able to get this to work?

Thanks.

@pluk77
Copy link
Contributor

pluk77 commented Apr 2, 2024

What seems to be the issue?

@hafkenscheid
Copy link
Author

With v1 I used to do something like was described in the README:

public function configureFields(string $pageName): iterable
{
    return [TextField::new('answerType')->
        setFormType(EnumType::class)->
        setFormTypeOptions(['enum_class' => AnswerTypeEnum::class])
    ];
}

Similarly, with v2, something like the following does not work out of the box. Especially not with FlagBagEnums

public function configureFields(string $pageName): iterable
{
    return [TextField::new('answerType')->
        setFormType(FlagBagType::class)->
        setFormTypeOptions(['class' => AnswerTypeEnum::class])
    ];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants