Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Form] Addedchoice_entry,checkbox_entry andradio_entry toChoiceType 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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

HeahDude
Copy link
Contributor

@HeahDudeHeahDude commentedApr 18, 2020
edited
Loading

QA
Branch?master
Bug fix?no
New feature?yes
Deprecations?no
Tickets~
LicenseMIT
Doc PRTODO

I had the idea when I started working on#36088, but#36484 lit the fire (ping@ThomasLandauer :)).

Allows to usechoice_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 withcheckbox_entry_* andradio_entry_* blocks.

So the order is now looked up like this (from last to first):

$choiceCheckBoxPrefixes = ['form',// as before'checkbox',// all checkboxes and radios, as before'choice_entry',// all fields (radio and checkbox) nested in choice lists'checkbox_entry',// all checkboxes nested in choice lists'_form_name_choice_field_name_entry',// as before];$choiceRadioPrefixes = ['form',// as before'checkbox',// all checkboxes and radios, as before'radio',// all radios, as before'choice_entry',// all fields (radio and checkbox) nested in choice lists'radio_entry',// all radios nested in choice lists'_form_name_choice_field_name_entry',// as before];

ThomasLandauer reacted with thumbs up emoji
@ThomasLandauer
Copy link
Contributor

Does this mean that you can set an optionradio_entry like at
https://symfony.com/doc/current/form/form_themes.html#custom-fragment-naming-for-individual-fields
to control the rendering of each individual radio button via a block in a custom form theme?

@HeahDude
Copy link
ContributorAuthor

Yes for all choice entries or for specific type of choice entries. A sibling of#36088.

@ThomasLandauer
Copy link
Contributor

Great!! But it will apply toall radios belonging to that field?! So#36484 is still the way to go to manipulateindividual radios?

HeahDude reacted with thumbs up emoji

@HeahDude
Copy link
ContributorAuthor

HeahDude commentedApr 18, 2020
edited
Loading

Ok I've updated the description to explain what this PR enables exactly.


$expectedBlockPrefixes = [
'form',
'checkbox',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Why do we expect thecheckbox 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
Copy link
Member

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 howarray_splice() is used.

@fabpot
Copy link
Member

@HeahDude What's the status here? Can you take comments into account?

@fabpot
Copy link
Member

Closing for now as the PR is stale. Feel free to reopen when you have time. Thank you.

@fabpotfabpot closed thisSep 7, 2020
@nicolas-grekasnicolas-grekas modified the milestones:next,5.2Oct 5, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@xabbuhxabbuhxabbuh requested changes

Assignees
No one assigned
Projects
None yet
Milestone
5.2
Development

Successfully merging this pull request may close these issues.

6 participants
@HeahDude@ThomasLandauer@fabpot@xabbuh@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp