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

replace formOptions property by configureFormOptions method #6814

Merged

Conversation

rgrassian
Copy link
Contributor

Subject

I am targeting this branch, because BC.
The form options could allow some logic, for instance it could depends on the roles. It's not possible with a property, it will be with a method.

Changelog

### Added
- Added some `Sonata\AdminBundle\Admin\AbstractAdmin::configureFormOptions()` to do great stuff.

### Deprecated
- Deprecated `Sonata\AdminBundle\Admin\AbstractAdmin::formOptions` property. 

@VincentLanglet VincentLanglet requested a review from a team January 27, 2021 14:49
src/Admin/AbstractAdmin.php Outdated Show resolved Hide resolved
src/Admin/AdminExtensionInterface.php Outdated Show resolved Hide resolved
@OskarStark
Copy link
Member

@VincentLanglet shall we introduce a new interface?

@rgrassian rgrassian force-pushed the createConfigureFormOptions branch from d9df7bc to 24a7cca Compare January 27, 2021 15:58
@VincentLanglet
Copy link
Member

@VincentLanglet shall we introduce a new interface?

Why ? With which method ?

configureFormOptions is a protected method in the AbstractAdmin

@VincentLanglet
Copy link
Member

VincentLanglet commented Jan 27, 2021

I think the psalm error is not related to this PR but to the new symfony release

@sonata-project/contributors Does someone understand the message ? ^^'

@VincentLanglet VincentLanglet requested review from OskarStark and a team January 27, 2021 16:04
@rgrassian rgrassian force-pushed the createConfigureFormOptions branch from 24a7cca to 54d4747 Compare January 28, 2021 13:24
@VincentLanglet VincentLanglet merged commit 94176c9 into sonata-project:3.x Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants