Skip to content

Commit

Permalink
Merge branch '2.0' into 2.1
Browse files Browse the repository at this point in the history
Conflicts:
	reference/forms/types/birthday.rst
	reference/forms/types/choice.rst
	reference/forms/types/form.rst
  • Loading branch information
weaverryan committed Apr 24, 2013
2 parents ddf358e + 53296b7 commit e6347d5
Show file tree
Hide file tree
Showing 12 changed files with 201 additions and 41 deletions.
55 changes: 28 additions & 27 deletions reference/forms/types/birthday.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,34 @@ This type is essentially the same as the :doc:`date</reference/forms/types/date>
type, but with a more appropriate default for the `years`_ option. The `years`_
option defaults to 120 years ago to the current year.

+----------------------+------------------------------------------------------------------------------------------------------------------------+
| Underlying Data Type | can be ``DateTime``, ``string``, ``timestamp``, or ``array`` (see the :ref:`input option <form-reference-date-input>`) |
+----------------------+------------------------------------------------------------------------------------------------------------------------+
| Rendered as | can be three select boxes or 1 or 3 text boxes, based on the `widget`_ option |
+----------------------+------------------------------------------------------------------------------------------------------------------------+
| Options | - `years`_ |
+----------------------+------------------------------------------------------------------------------------------------------------------------+
| Inherited | - `widget`_ |
| options | - `input`_ |
| | - `months`_ |
| | - `days`_ |
| | - `format`_ |
| | - `data_timezone`_ |
| | - `user_timezone`_ |
| | - `invalid_message`_ |
| | - `invalid_message_parameters`_ |
| | - `read_only`_ |
| | - `disabled`_ |
| | - `virtual`_ |
+----------------------+------------------------------------------------------------------------------------------------------------------------+
| Parent type | :doc:`date</reference/forms/types/date>` |
+----------------------+------------------------------------------------------------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\BirthdayType` |
+----------------------+------------------------------------------------------------------------------------------------------------------------+

Field Options
-------------
+----------------------+-------------------------------------------------------------------------------+
| Underlying Data Type | can be ``DateTime``, ``string``, ``timestamp``, or ``array`` |
| | (see the :ref:`input option <form-reference-date-input>`) |
+----------------------+-------------------------------------------------------------------------------+
| Rendered as | can be three select boxes or 1 or 3 text boxes, based on the `widget`_ option |
+----------------------+-------------------------------------------------------------------------------+
| Overridden Options | - `years`_ |
+----------------------+-------------------------------------------------------------------------------+
| Inherited Options | - `widget`_ |
| | - `input`_ |
| | - `months`_ |
| | - `days`_ |
| | - `format`_ |
| | - `data_timezone`_ |
| | - `user_timezone`_ |
| | - `invalid_message`_ |
| | - `invalid_message_parameters`_ |
| | - `read_only`_ |
| | - `disabled`_ |
| | - `virtual`_ |
+----------------------+-------------------------------------------------------------------------------+
| Parent type | :doc:`date</reference/forms/types/date>` |
+----------------------+-------------------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\BirthdayType` |
+----------------------+-------------------------------------------------------------------------------+

Overridden Options
------------------

years
~~~~~
Expand Down
12 changes: 6 additions & 6 deletions reference/forms/types/choice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ option.
| | - `expanded`_ |
| | - `preferred_choices`_ |
| | - `empty_value`_ |
| | - `empty_data`_ |
| | - `by_reference`_ |
+-------------+-----------------------------------------------------------------------------+
| Inherited | - `required`_ |
| options | - `label`_ |
| | - `read_only`_ |
| | - `disabled`_ |
| | - `error_bubbling`_ |
| | - `virtual`_ |
| | - `by_reference`_ |
| | - `empty_data`_ |
+-------------+-----------------------------------------------------------------------------+
| Parent type | :doc:`form</reference/forms/types/form>` (if expanded), ``field`` otherwise |
+-------------+-----------------------------------------------------------------------------+
Expand Down Expand Up @@ -105,10 +105,6 @@ can be created to supply the choices.

.. include:: /reference/forms/types/options/empty_value.rst.inc

.. include:: /reference/forms/types/options/empty_data.rst.inc

.. include:: /reference/forms/types/options/by_reference.rst.inc

Inherited options
-----------------

Expand All @@ -127,3 +123,7 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:
These options inherit from the :doc:`date</reference/forms/types/form>` type:

.. include:: /reference/forms/types/options/virtual.rst.inc

.. include:: /reference/forms/types/options/by_reference.rst.inc

.. include:: /reference/forms/types/options/empty_data.rst.inc
17 changes: 16 additions & 1 deletion reference/forms/types/country.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ you should just use the ``choice`` type directly.
+-------------+-----------------------------------------------------------------------+
| Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) |
+-------------+-----------------------------------------------------------------------+
| Overridden | - `choices`_ |
| Options | |
+-------------+-----------------------------------------------------------------------+
| Inherited | - `multiple`_ |
| options | - `expanded`_ |
| | - `preferred_choices`_ |
Expand All @@ -37,6 +40,18 @@ you should just use the ``choice`` type directly.
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CountryType` |
+-------------+-----------------------------------------------------------------------+

Overridden Options
------------------

choices
~~~~~~~

**default**: :method:`Symfony\\Component\\Locale\\Locale::getDisplayCountries`

The country type defaults the ``choices`` option to the all locales which are
returned by :method:`Symfony\\Component\\Locale\\Locale::getDisplayCountries`.
It uses the default locale to determine the language.

Inherited options
-----------------

Expand All @@ -60,4 +75,4 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc
.. include:: /reference/forms/types/options/disabled.rst.inc
17 changes: 15 additions & 2 deletions reference/forms/types/csrf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,26 @@ The ``csrf`` type is a hidden input field containing a CSRF token.
+-------------+--------------------------------------------------------------------+
| Options | - ``csrf_provider`` |
| | - ``intention`` |
| | - ``property_path`` |
+-------------+--------------------------------------------------------------------+
| Overridden | - ``property_path`` |
| Options | |
| | |
+-------------+--------------------------------------------------------------------+
| Parent type | ``hidden`` |
+-------------+--------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Form\\Extension\\Csrf\\Type\\CsrfType` |
+-------------+--------------------------------------------------------------------+

Overridden Options
------------------

property_path
~~~~~~~~~~~~~

**default**: ``false``

A Csrf field must not be mapped to the object, so this option defaults to ``false``.

Field Options
-------------

Expand All @@ -36,4 +49,4 @@ intention

An optional unique identifier used to generate the CSRF token.

.. include:: /reference/forms/types/options/property_path.rst.inc
.. include:: /reference/forms/types/options/property_path.rst.inc
18 changes: 18 additions & 0 deletions reference/forms/types/date.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ day, and year) or three select boxes (see the `widget_` option).
| | - `data_timezone`_ |
| | - `user_timezone`_ |
+----------------------+-----------------------------------------------------------------------------+
| Overridden Options | - `by_reference`_ |
| | - `error_bubbling`_ |
+----------------------+-----------------------------------------------------------------------------+
| Inherited | - `invalid_message`_ |
| options | - `invalid_message_parameters`_ |
| | - `read_only`_ |
Expand Down Expand Up @@ -113,6 +116,21 @@ Alternatively, you can specify a string to be displayed for the "blank" value::

.. include:: /reference/forms/types/options/user_timezone.rst.inc

Overridden Options
------------------

by_reference
~~~~~~~~~~~~

**default**: ``false``

The ``DateTime`` classes are treated as immutable objects.

error_bubbling
~~~~~~~~~~~~~~

**default**: ``false``

Inherited options
-----------------

Expand Down
19 changes: 19 additions & 0 deletions reference/forms/types/entity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ objects from the database.
| | - `query_builder`_ |
| | - `em`_ |
+-------------+------------------------------------------------------------------+
| Overridden | - `choices` |
| Options | - `choice_list` |
+-------------+------------------------------------------------------------------+
| Inherited | - `required`_ |
| options | - `label`_ |
| | - `multiple`_ |
Expand Down Expand Up @@ -121,6 +124,22 @@ em
If specified, the specified entity manager will be used to load the choices
instead of the default entity manager.

Overridden Options
------------------

choices
~~~~~~~

**default**: ``null``

choice_list
~~~~~~~~~~~

**default**: all entities selected

The choices will default to all entities selected with one of the options that
are documented above.

Inherited options
-----------------

Expand Down
26 changes: 23 additions & 3 deletions reference/forms/types/hidden.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,39 @@ The hidden type represents a hidden input field.
+-------------+----------------------------------------------------------------------+
| Rendered as | ``input`` ``hidden`` field |
+-------------+----------------------------------------------------------------------+
| Inherited | - ``data`` |
| options | - ``property_path`` |
| Overridden | - `required`_ |
| Options | - `error_bubbling`_ |
+-------------+----------------------------------------------------------------------+
| Inherited | - `data`_ |
| options | - `property_path`_ |
+-------------+----------------------------------------------------------------------+
| Parent type | :doc:`field</reference/forms/types/field>` |
+-------------+----------------------------------------------------------------------+
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\HiddenType` |
+-------------+----------------------------------------------------------------------+

Overridden Options
------------------

required
~~~~~~~~

**default**: ``false``

Hidden fields cannot have a required attribute.

error_bubbling
~~~~~~~~~~~~~~

**default**: ``true``

Pass errors to the root form, otherwise they will not be visible.

Inherited Options
-----------------

These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/data.rst.inc

.. include:: /reference/forms/types/options/property_path.rst.inc
.. include:: /reference/forms/types/options/property_path.rst.inc
17 changes: 16 additions & 1 deletion reference/forms/types/language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ you should just use the ``choice`` type directly.
+-------------+------------------------------------------------------------------------+
| Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) |
+-------------+------------------------------------------------------------------------+
| Overridden | - `choices`_ |
| Options | |
+-------------+------------------------------------------------------------------------+
| Inherited | - `multiple`_ |
| options | - `expanded`_ |
| | - `preferred_choices`_ |
Expand All @@ -38,6 +41,18 @@ you should just use the ``choice`` type directly.
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\LanguageType` |
+-------------+------------------------------------------------------------------------+

Overridden Options
------------------

choices
~~~~~~~

**default**: :method:`Symfony\\Component\\Locale\\Locale::getDisplayLanguages`

The choices option defaults to all languages returned by
:method:`Symfony\\Component\\Locale\\Locale::getDisplayLanguages`. It uses the
default locale to specify the language.

Inherited Options
-----------------

Expand All @@ -61,4 +76,4 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:

.. include:: /reference/forms/types/options/read_only.rst.inc

.. include:: /reference/forms/types/options/disabled.rst.inc
.. include:: /reference/forms/types/options/disabled.rst.inc
Loading

0 comments on commit e6347d5

Please sign in to comment.