Skip to content

[Form] Added documentation for Form Type Extensions #1806

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 3 commits into from
Oct 24, 2012
Merged

[Form] Added documentation for Form Type Extensions #1806

merged 3 commits into from
Oct 24, 2012

Conversation

pvanliefland
Copy link

This pull request is based on #1691. See issue #814. The text and examples have been adapted and tested for Symfony 2.0.x.

Form type extensions have 2 main use cases:

#. You want to add a **generic feature to several types** (such as
adding a "help" text to every field type)
Copy link
Member

Choose a reason for hiding this comment

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

Put a semicolon at the end of this item

@pvanliefland
Copy link
Author

@wouterj Ok, I will manage to find some more time to take your remarks into account. However, I'm a bit surprised by the additional remarks as this PR is simply a port of #1691, that had already been reviewed by you and Stof, and validated by @weaverryan.

@stof
Copy link
Member

stof commented Oct 11, 2012

@pvanliefland Proofreading the doc is an iterative process. We regularly miss things in PRs when proofreading them (which is why there is regularly PRs fixing typos in the doc when someone else reads it).

@pvanliefland
Copy link
Author

@stof I understand, but some of the remarks that have been made could be integrated in the "contributing" section, it would save people like me a lot of time. In fact I might do a PR on this one as well ;)

Anyway, the changes have been implemented.

@pvanliefland
Copy link
Author

Let me know when everything is ok so that I can squash everything into a single commit.

<?php echo $view['form']->widget($form) ?>
<?php if (null !== $image_url): ?>
<img src="<?php echo $view['assets']->getUrl($image_url) ?>"/>
<?php endif ?>
Copy link
Member

Choose a reason for hiding this comment

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

The 2 examples are now different, it should be better if those are equal but in another syntax.

Copy link
Author

Choose a reason for hiding this comment

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

What's the difference ?

@wouterj
Copy link
Member

wouterj commented Oct 12, 2012

@pvanliefland I have created a 'Standards' section in the documentation contribution section, just because they save me and @stof a lot of time too...

We can't describe everything inside the standards, so I have putted the main rules in it. The empty lines between the bracket and the first method is a Coding Standard rule and things like the semi colons are English (and Dutch) spelling rules.

But if you have suggestions to put in the standards, please create a PR!

@weaverryan weaverryan merged commit 4a238cb into symfony:2.0 Oct 24, 2012
@weaverryan
Copy link
Member

Hey Pierre!

This is really really nice work! I've merged this in with only a few minor changes at sha: 88f7b5e

I also used your work on #1691 to update the entry then for 2.1 - you can see that work at sha: 28ea82b

Please double-check my work and let me know if you see anything that I've missed!

Thanks!

@pvanliefland
Copy link
Author

Hello Ryan,

Thanks, I'm glad you merged it. It has been harder than I expected, but it was an interesting experience.

I checked your changes, both here and for the 2.1 version and they look ok to me.

Cheers and thanks for your assistance,

Pierre

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.

4 participants