Permalink
Browse files

minor #3611 [Reference][Forms] add an introductory table containing a…

…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
  • Loading branch information...
weaverryan committed Mar 19, 2014
2 parents fd8f7ae + b3ca94c commit 67129b1d72918c164eae9ea0c586898bce778286
@@ -12,20 +12,24 @@ A simple, non-responsive button.
+----------------------+----------------------------------------------------------------------+
| Rendered as | ``button`` tag |
+----------------------+----------------------------------------------------------------------+
| Options | - `attr`_ |
| | - `disabled`_ |
| Inherited | - `attr`_ |
| options | - `disabled`_ |
| | - `label`_ |
| | - `translation_domain`_ |
+----------------------+----------------------------------------------------------------------+
| Overridden options | - `auto_initialize`_ |
+----------------------+----------------------------------------------------------------------+
| Parent type | none |
+----------------------+----------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\ButtonType` |
+----------------------+----------------------------------------------------------------------+
Options
-------
Inherited options
-----------------
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 form type tree (i.e. it can not be used as a form type on its own).
.. include:: /reference/forms/types/options/button_attr.rst.inc
@@ -34,8 +38,3 @@ Options
.. include:: /reference/forms/types/options/button_label.rst.inc
.. include:: /reference/forms/types/options/button_translation_domain.rst.inc
Overridden Options
------------------
.. include:: /reference/forms/types/options/button_auto_initialize.rst.inc
@@ -4,10 +4,47 @@
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.
on all types for which ``form`` is the parent type.
+-----------+--------------------------------------------------------------------+
| Options | - `compound`_ |
| | - `data`_ |
| | - `data_class`_ |
| | - `empty_data`_ |
| | - `required`_ |
| | - `label_attr`_ |
| | - `constraints`_ |
| | - `cascade_validation`_ |
| | - `read_only`_ |
| | - `trim`_ |
| | - `mapped`_ |
| | - `property_path`_ |
| | - `max_length`_ |
| | - `by_reference`_ |
| | - `error_bubbling`_ |
| | - `inherit_data`_ |
| | - `error_mapping`_ |
| | - `invalid_message`_ |
| | - `invalid_message_parameters`_ |
| | - `extra_fields_message`_ |
| | - `post_max_size_message`_ |
| | - `pattern`_ |
+-----------+--------------------------------------------------------------------+
| Inherited | - `block_name`_ |
| options | - `disabled`_ |
| | - `label`_ |
| | - `attr`_ |
| | - `translation_domain`_ |
| | - `auto_initialize`_ |
+-----------+--------------------------------------------------------------------+
| Parent | none |
+-----------+--------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType` |
+-----------+--------------------------------------------------------------------+
Options
-------
.. include:: /reference/forms/types/options/data.rst.inc
@@ -25,8 +62,6 @@ on all fields.
.. include:: /reference/forms/types/options/required.rst.inc
.. include:: /reference/forms/types/options/label.rst.inc
.. include:: /reference/forms/types/options/label_attr.rst.inc
.. include:: /reference/forms/types/options/constraints.rst.inc
@@ -35,20 +70,12 @@ on all fields.
.. include:: /reference/forms/types/options/read_only.rst.inc
.. include:: /reference/forms/types/options/disabled.rst.inc
.. include:: /reference/forms/types/options/trim.rst.inc
.. include:: /reference/forms/types/options/mapped.rst.inc
.. include:: /reference/forms/types/options/property_path.rst.inc
.. include:: /reference/forms/types/options/attr.rst.inc
.. include:: /reference/forms/types/options/translation_domain.rst.inc
.. include:: /reference/forms/types/options/block_name.rst.inc
.. _reference-form-option-max_length:
.. include:: /reference/forms/types/options/max_length.rst.inc
@@ -72,3 +99,28 @@ on all fields.
.. _reference-form-option-pattern:
.. include:: /reference/forms/types/options/pattern.rst.inc
.. include:: /reference/forms/types/options/action.rst.inc
.. include:: /reference/forms/types/options/method.rst.inc
Inherited options
-----------------
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 ``form`` type and
the :doc:`button type </reference/forms/types/button>`, but it is not part
of the form type tree (i.e. it can not be used as a form type on its own).
.. include:: /reference/forms/types/options/block_name.rst.inc
.. include:: /reference/forms/types/options/disabled.rst.inc
.. include:: /reference/forms/types/options/label.rst.inc
.. include:: /reference/forms/types/options/attr.rst.inc
.. include:: /reference/forms/types/options/translation_domain.rst.inc
.. include:: /reference/forms/types/options/auto_initialize.rst.inc
@@ -0,0 +1,8 @@
auto_initialize
~~~~~~~~~~~~~~~
**type**: ``boolean`` **default**: ``true``
An internal option: sets whether the form should be initialized automatically.
For all fields, this option should only be ``true`` for root forms. You won't
need to change this option and probably won't need to worry about it.
@@ -1,9 +0,0 @@
auto_initialize
~~~~~~~~~~~~~~~
**type**: ``boolean`` **default**: ``false``
An internal option: sets whether the form should be initialized automatically.
For all fields, this option should only be ``true`` for root forms and since
a button can't be an entire form on its own, this is set to ``false``. You
won't need to change this option and probably won't need to worry about it.

0 comments on commit 67129b1

Please sign in to comment.