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

Document Twig test "rootform"#10022

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

Merged
javiereguiluz merged 4 commits intosymfony:2.8fromyceruto:rootform
Jul 6, 2018
Merged

Conversation

@yceruto
Copy link
Member

Documents PRsymfony/symfony#25236 andcloses#8829, sorry for the delay.

@yceruto
Copy link
MemberAuthor

This is better now, gracias Javier 👍


..code-block::twig
{# DON'T DO THIS: this code will fail when the form doesn't have a parent
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I'd like to rephrase this sentence... since in no case this code will fail because theFormView has a publicparent property. The problem appears when you have also defined aparent form field. The last one will have priority for Twig due the array access ability.

I'm not sure how to explain it in short though.

javiereguiluz reacted with thumbs up emoji
Copy link
MemberAuthor

@ycerutoycerutoJul 5, 2018
edited
Loading

Choose a reason for hiding this comment

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

I mean... what you expect forform.parent could change depending on whether your form has or not aparent field. If no: you're checking the parent view, if yes: you're checking the parent field

javiereguiluz reacted with thumbs up emoji
@yceruto
Copy link
MemberAuthor

Perfect, thank you!

@javiereguiluz
Copy link
Member

Yonel, thanks for implementing this feature and for providing the docs for it!

@javiereguiluzjaviereguiluz merged commitcf355c9 intosymfony:2.8Jul 6, 2018
javiereguiluz added a commit that referenced this pull requestJul 6, 2018
This PR was merged into the 2.8 branch.Discussion----------Document Twig test "rootform"Documents PRsymfony/symfony#25236 andcloses#8829, sorry for the delay.Commits-------cf355c9 Reworded the code comments423bfae Minor reword740803e Rewordfd433a1 Document Twig test "rootform"
@ycerutoyceruto deleted the rootform branchJuly 6, 2018 11:56
Copy link
Contributor

@HeahDudeHeahDude left a comment

Choose a reason for hiding this comment

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

👍

..code-block::twig
{# DON'T DO THIS: this simple check can't differentiate between a form having
a parent form view and a form defining a normal form field called 'parent' #}
Copy link
Contributor

Choose a reason for hiding this comment

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

- normal+ nested

?

xabbuh reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

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

fixed in640e8e5

xabbuh added a commit that referenced this pull requestAug 7, 2018
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull requestAug 8, 2018
* 3.4:  Simplified the "Release Process" page  [Workflow] Fix typo documentation  Fix mismatched list items  [symfony#9988] fix minor typos  [symfony#10099] update XML and PHP config examples  [symfony#9969] fix a minor typo  [symfony#10022] fix a minor typo  preUpdate Event Listener On Uploaded Imagery  [symfony#10124] fix XML attribute name  [symfony#10062] fix the code block  [PHPUnitBridge] Explain how to show stack traces  Fix docs on trusted hosts  opcode optimizations
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this pull requestAug 8, 2018
* 4.1:  Simplified the "Release Process" page  [Workflow] Fix typo documentation  Fix mismatched list items  typos in sample code  [symfony#9988] fix minor typos  [symfony#10099] update XML and PHP config examples  [symfony#9969] fix a minor typo  [symfony#10022] fix a minor typo  preUpdate Event Listener On Uploaded Imagery  [symfony#9757] fix rst syntax  [symfony#10124] fix XML attribute name  [symfony#10062] fix the code block  [PHPUnitBridge] Explain how to show stack traces  Fix docs on trusted hosts  opcode optimizations
Guikingone pushed a commit to Guikingone/symfony-docs that referenced this pull requestFeb 12, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@xabbuhxabbuhxabbuh left review comments

+1 more reviewer

@HeahDudeHeahDudeHeahDude left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

2.8

Development

Successfully merging this pull request may close these issues.

5 participants

@yceruto@javiereguiluz@xabbuh@HeahDude@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp