Skip to content
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

[Reference][Forms] add an introductory table containing all options of the basic form type #3611

Merged
merged 4 commits into from
Mar 19, 2014

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Feb 26, 2014

Q A
Doc fix? yes
New docs? no
Applies to all
Fixed tickets

@@ -4,11 +4,44 @@
form Field Type
===============

See :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType`.

The ``form`` type predefines a couple of options that are then available
on all fields.
Copy link
Member

Choose a reason for hiding this comment

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

all fields that have form as parent. They can also specify another form type as parent, or no parent at all.

@wouterj
Copy link
Member

wouterj commented Feb 26, 2014

We may need to seperate it a bit more: As of 2.3, the form type is extracted in a FormType and a BaseType (not included in the form tree), the FormType extends the BaseType.
This is done, because the form buttons use the BaseType and not the FormType.

So we can't say, these options are available on every field. And we may need to make a difference between options of the BaseType and options of the FormType, in cases someone wants to create a custom button.

@xabbuh
Copy link
Member Author

xabbuh commented Feb 27, 2014

You're right. This also applies to the ButtonType docs. But I'm not sure if it is a good idea to create separate docs for the BaseType and reference its options via a inherited options section since BaseType is no real form type that can be used.

@wouterj
Copy link
Member

wouterj commented Feb 27, 2014

No, I think we should split the Form Type article. Or add something like (BaseType) to the options used by the base type with a little explaination in the beginning why there is a difference between BaseType and FormType options.

@xabbuh
Copy link
Member Author

xabbuh commented Feb 27, 2014

We can go that way. But then the same should be documented for the ButtonType. What do you think?

@xabbuh xabbuh mentioned this pull request Mar 4, 2014
17 tasks
@xabbuh
Copy link
Member Author

xabbuh commented Mar 8, 2014

I added an additional table to the form type listing the options inherited from the BaseType class and added a note to the button type reference.

The following options are defined in the
:class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\BaseType` class.
The ``BaseType`` class is the parent class for both the ``button`` type and
the :doc:`form type </reference/forms/types/form>` but it is not part of the
Copy link
Member

Choose a reason for hiding this comment

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

I prefer a comma before "but"

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right. That really does make sense.

@xabbuh
Copy link
Member Author

xabbuh commented Mar 8, 2014

I also added docs for the auto_initialize option.

:class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\BaseType` class.
The ``BaseType`` class is the parent class for both the ``button`` type and
the :doc:`form type </reference/forms/types/form>`, but it is not part of
the form type tree (i.e. it can not be used as a form type on its own).
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if I want this level of detail here - I don't think it matters very much what the parent type is when it's "form", and I especially don't think it's very important to say exactly which class you can find the code in. Thoughts?

@weaverryan
Copy link
Member

@xabbuh I think I'm happy with this now :). Can you rebase for me?

@xabbuh
Copy link
Member Author

xabbuh commented Mar 19, 2014

@weaverryan Of course, here you are.

@weaverryan
Copy link
Member

Awesome, thank you very much!

weaverryan added a commit that referenced this pull request Mar 19, 2014
…ll options of the basic form type (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[Reference][Forms] add an introductory table containing all options of the basic form type

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets |

Commits
-------

b3ca94c removed the description of the auto_initialize option from the button type reference docs
58170fe document the auto_initialize option for the form type, refs #3410
2ca0306 document the options inherited from the BaseType class
911cc70 add an introductory table containing all options of the basic form type
@weaverryan weaverryan merged commit b3ca94c into symfony:2.3 Mar 19, 2014
@xabbuh xabbuh deleted the form-type-options-table branch March 19, 2014 16:19
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.

3 participants