-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Added choice_entry
, checkbox_entry
and radio_entry
to ChoiceType
entries
#36489
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
Conversation
…hoiceType` entries
Does this mean that you can set an option |
Yes for all choice entries or for specific type of choice entries. A sibling of #36088. |
Great!! But it will apply to all radios belonging to that field?! So #36484 is still the way to go to manipulate individual radios? |
Ok I've updated the description to explain what this PR enables exactly. |
|
||
$expectedBlockPrefixes = [ | ||
'form', | ||
'checkbox', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we expect the checkbox
prefix here?
/** | ||
* Appends a block prefix after the static defaults and before dynamic ones. | ||
*/ | ||
public static function appendStaticBlockPrefix(FormView $view, string $prefix, bool $decreaseOffset): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not add this method. To me it decreases readability a lot to not just see in place how array_splice()
is used.
@HeahDude What's the status here? Can you take comments into account? |
Closing for now as the PR is stale. Feel free to reopen when you have time. Thank you. |
I had the idea when I started working on #36088, but #36484 lit the fire (ping @ThomasLandauer :)).
Allows to use
choice_entry_*
blocks to customize all choice entries (whether radio or checkbox) for all types, in addition (and with precedence) of the dynamic_form_name_choice_field_name_entry_*
.Plus specific type of entries with
checkbox_entry_*
andradio_entry_*
blocks.So the order is now looked up like this (from last to first):