Skip to content

Added information about the new form(), form_start() and form_end() helpers #2092

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

Merged
merged 2 commits into from
Apr 21, 2013

Conversation

webmozart
Copy link
Contributor

@wouterj
Copy link
Member

wouterj commented Jan 2, 2013

The variables argument in both twig references should be changed into vars, they should be equal to the actual name of the arguments in PHP (because the next version of Twig supports named arguments).

@webmozart
Copy link
Contributor Author

@wouterj I suggest that this change be made in a separate PR.

@wouterj
Copy link
Member

wouterj commented Jan 2, 2013

@bschussek I meant the variables which you added in this PR, the other arguments in the documentation are correct.

@@ -613,12 +605,12 @@ of code. Of course, you'll usually need much more flexibility when rendering:
{{ form_rest(form) }}

<input type="submit" />
</form>
{{ form_end() }}
Copy link
Contributor

Choose a reason for hiding this comment

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

should be form_end(form) and the form_rest would not be needed anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@webmozart
Copy link
Contributor Author

I meant the variables which you added in this PR, the other arguments in the documentation are correct.

I don't understand. As far as I see all the arguments in the Twig reference are named "variables", not "vars". Also I fail to see how Twig could take advantage of named arguments here. If you check FormExtension.php, there is no specification of the function arguments.

@stof
Copy link
Member

stof commented Jan 2, 2013

Indeed, as you are using a custom node, the named arguments will not be supported unless you add it in your custom node

@webmozart
Copy link
Contributor Author

Consequently I think this change can be postponed to when this will be supported. Right now, the Twig reference is consistent: All methods indicate the parameter variables.

@webmozart
Copy link
Contributor Author

Rebased on master

fabpot added a commit to symfony/symfony that referenced this pull request Apr 19, 2013
This PR was merged into the master branch.

Discussion
----------

[2.3] [Form] Implemented form processors

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: partially #5493
Todo: -
License of the code: MIT
Documentation PR: symfony/symfony-docs#2092

Commits
-------

11fee06 [TwigBridge] Removed duplicate entries from the CHANGELOG
68f360c [Form] Moved upgrade nodes to UPGRADE-3.0
01b71a4 [Form] Removed trigger_error() for deprecations as of 3.0
81f8c67 [Form] Implemented form processors
0ea75db [Form] Improved FormRenderer::renderBlock() to be usable outside of form blocks
@webmozart
Copy link
Contributor Author

I added information about request handlers now.

@webmozart
Copy link
Contributor Author

This can be merged.

weaverryan added a commit that referenced this pull request Apr 21, 2013
[WCM] Added information about the new form(), form_start() and form_end() helpers
@weaverryan weaverryan merged commit 7f89c45 into symfony:master Apr 21, 2013
weaverryan added a commit that referenced this pull request Apr 21, 2013
@weaverryan
Copy link
Member

Hey Mr Bernhard!

I've merged this in with minor tweaks at sha: adf8989. I've kept a reference to the old "bind" method so that if people look for it, they'll find the explanation of why it's changed. You did a nice job covering all the different areas that needed to be updated, so I think we're in great shape. If you see any tweaks that need to be made to my tweaks, let me know.

Thanks!

@webmozart
Copy link
Contributor Author

Thank you so much Ryan! :) 👍

weaverryan added a commit that referenced this pull request Apr 22, 2013
weaverryan added a commit that referenced this pull request Apr 22, 2013
ondrejmirtes pushed a commit to ondrejmirtes/symfony that referenced this pull request Nov 25, 2013
This PR was merged into the master branch.

Discussion
----------

[Form] Renamed form processors to request handlers

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | symfony/symfony-docs#2092

Commits
-------

ae7c378 [Form] Renamed form processors to request handlers
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

Successfully merging this pull request may close these issues.

5 participants