diff --git a/reference/forms/types/birthday.rst b/reference/forms/types/birthday.rst index 2f9a9a8eb26..5d8132c92ee 100644 --- a/reference/forms/types/birthday.rst +++ b/reference/forms/types/birthday.rst @@ -14,31 +14,32 @@ This type is essentially the same as the :doc:`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 `) | -+----------------------+------------------------------------------------------------------------------------------------------------------------+ -| 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`_ | -| | - `pattern`_ | -| | - `data_timezone`_ | -| | - `user_timezone`_ | -| | - `invalid_message`_ | -| | - `invalid_message_parameters`_ | -+----------------------+------------------------------------------------------------------------------------------------------------------------+ -| Parent type | :doc:`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 `) | ++----------------------+-------------------------------------------------------------------------------+ +| Rendered as | can be three select boxes or 1 or 3 text boxes, based on the `widget`_ option | ++----------------------+-------------------------------------------------------------------------------+ +| Overriden Options | - `years`_ | ++----------------------+-------------------------------------------------------------------------------+ +| Inherited Options | - `widget`_ | +| | - `input`_ | +| | - `months`_ | +| | - `days`_ | +| | - `format`_ | +| | - `pattern`_ | +| | - `data_timezone`_ | +| | - `user_timezone`_ | +| | - `invalid_message`_ | +| | - `invalid_message_parameters`_ | ++----------------------+-------------------------------------------------------------------------------+ +| Parent type | :doc:`date` | ++----------------------+-------------------------------------------------------------------------------+ +| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\BirthdayType` | ++----------------------+-------------------------------------------------------------------------------+ + +Overriden Options +----------------- years ~~~~~ diff --git a/reference/forms/types/choice.rst b/reference/forms/types/choice.rst index c0c72982c70..01224dac9fb 100644 --- a/reference/forms/types/choice.rst +++ b/reference/forms/types/choice.rst @@ -19,13 +19,13 @@ option. | | - `expanded`_ | | | - `preferred_choices`_ | | | - `empty_value`_ | -| | - `empty_data`_ | -| | - `by_reference`_ | +-------------+-----------------------------------------------------------------------------+ | Inherited | - `required`_ | | options | - `label`_ | | | - `read_only`_ | | | - `error_bubbling`_ | +| | - `by_reference`_ | +| | - `empty_data`_ | +-------------+-----------------------------------------------------------------------------+ | Parent type | :doc:`form` (if expanded), ``field`` otherwise | +-------------+-----------------------------------------------------------------------------+ @@ -103,10 +103,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 ----------------- @@ -119,3 +115,7 @@ These options inherit from the :doc:`field` type: .. include:: /reference/forms/types/options/read_only.rst.inc .. include:: /reference/forms/types/options/error_bubbling.rst.inc + +.. include:: /reference/forms/types/options/by_reference.rst.inc + +.. include:: /reference/forms/types/options/empty_data.rst.inc diff --git a/reference/forms/types/country.rst b/reference/forms/types/country.rst index d83aad0e827..b7e6dbb1cd7 100644 --- a/reference/forms/types/country.rst +++ b/reference/forms/types/country.rst @@ -22,6 +22,9 @@ you should just use the ``choice`` type directly. +-------------+-----------------------------------------------------------------------+ | Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) | +-------------+-----------------------------------------------------------------------+ +| Overriden | - `choices`_ | +| Options | | ++-------------+-----------------------------------------------------------------------+ | Inherited | - `multiple`_ | | options | - `expanded`_ | | | - `preferred_choices`_ | @@ -36,6 +39,18 @@ you should just use the ``choice`` type directly. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CountryType` | +-------------+-----------------------------------------------------------------------+ +Overriden 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 ----------------- diff --git a/reference/forms/types/csrf.rst b/reference/forms/types/csrf.rst index f814380cf9c..2416f7d4c5c 100644 --- a/reference/forms/types/csrf.rst +++ b/reference/forms/types/csrf.rst @@ -11,13 +11,26 @@ The ``csrf`` type is a hidden input field containing a CSRF token. +-------------+--------------------------------------------------------------------+ | Options | - ``csrf_provider`` | | | - ``intention`` | -| | - ``property_path`` | ++-------------+--------------------------------------------------------------------+ +| Overriden | - ``property_path`` | +| Options | | +| | | +-------------+--------------------------------------------------------------------+ | Parent type | ``hidden`` | +-------------+--------------------------------------------------------------------+ | Class | :class:`Symfony\\Component\\Form\\Extension\\Csrf\\Type\\CsrfType` | +-------------+--------------------------------------------------------------------+ +Overriden Options +----------------- + +property_path +~~~~~~~~~~~~~ + +**default**: ``false`` + +A Csrf field must not be mapped to the object, so this option defaults to ``false``. + Field Options ------------- @@ -36,4 +49,4 @@ intention An optional unique identifier used to generate the CSRF token. -.. include:: /reference/forms/types/options/property_path.rst.inc \ No newline at end of file +.. include:: /reference/forms/types/options/property_path.rst.inc diff --git a/reference/forms/types/date.rst b/reference/forms/types/date.rst index ea7f9dac43f..f395a7dea54 100644 --- a/reference/forms/types/date.rst +++ b/reference/forms/types/date.rst @@ -30,6 +30,9 @@ day, and year) or three select boxes (see the `widget_` option). | | - `data_timezone`_ | | | - `user_timezone`_ | +----------------------+-----------------------------------------------------------------------------+ +| Overriden Options | - `by_reference`_ | +| | - `error_bubbling`_ | ++----------------------+-----------------------------------------------------------------------------+ | Inherited | - `invalid_message`_ | | options | - `invalid_message_parameters`_ | +----------------------+-----------------------------------------------------------------------------+ @@ -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 +Overriden Options +----------------- + +by_reference +~~~~~~~~~~~~ + +**default**: ``false`` + +The ``DateTime`` classes are treated as immutable objects. + +error_bubbling +~~~~~~~~~~~~~~ + +**default**: ``false`` + Inherited options ----------------- @@ -120,4 +138,4 @@ These options inherit from the :doc:`field` type: .. include:: /reference/forms/types/options/invalid_message.rst.inc -.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc \ No newline at end of file +.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index f2f7a2cfc9b..a5ff6c8e5c7 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -17,6 +17,9 @@ objects from the database. | | - `query_builder`_ | | | - `em`_ | +-------------+------------------------------------------------------------------+ +| Overriden | - `choices` | +| Options | - `choice_list` | ++-------------+------------------------------------------------------------------+ | Inherited | - `required`_ | | options | - `label`_ | | | - `multiple`_ | @@ -108,6 +111,22 @@ em If specified, the specified entity manager will be used to load the choices instead of the default entity manager. +Overriden 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 ----------------- diff --git a/reference/forms/types/form.rst b/reference/forms/types/form.rst index 1121a0befb2..346adf45bdd 100644 --- a/reference/forms/types/form.rst +++ b/reference/forms/types/form.rst @@ -4,4 +4,28 @@ form Field Type =============== -See :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType`. \ No newline at end of file +See :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FormType`. + +Overriden Options +----------------- + +empty_data +~~~~~~~~~~ + +**default**: ``array()`` / ``new $data_class()`` + +When no ``data_class`` option is specified, it will return an empty array. +Otherwise, it will default to a new instance of the class defined in +``data_class``. + +virtual +~~~~~~~ + +**default**: ``false`` + +error_bubbling +~~~~~~~~~~~~~~ + +**default**: ``true`` + +Errors of the form bubbles to the root form by default. diff --git a/reference/forms/types/hidden.rst b/reference/forms/types/hidden.rst index f5c609060f2..5b5ce26f5aa 100644 --- a/reference/forms/types/hidden.rst +++ b/reference/forms/types/hidden.rst @@ -9,14 +9,34 @@ The hidden type represents a hidden input field. +-------------+----------------------------------------------------------------------+ | Rendered as | ``input`` ``hidden`` field | +-------------+----------------------------------------------------------------------+ -| Inherited | - ``data`` | -| options | - ``property_path`` | +| Overriden | - `required`_ | +| Options | - `error_bubbling`_ | ++-------------+----------------------------------------------------------------------+ +| Inherited | - `data`_ | +| options | - `property_path`_ | +-------------+----------------------------------------------------------------------+ | Parent type | :doc:`field` | +-------------+----------------------------------------------------------------------+ | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\HiddenType` | +-------------+----------------------------------------------------------------------+ +Overriden 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 ----------------- diff --git a/reference/forms/types/language.rst b/reference/forms/types/language.rst index a0865e7ff6b..76aa734578e 100644 --- a/reference/forms/types/language.rst +++ b/reference/forms/types/language.rst @@ -23,6 +23,9 @@ you should just use the ``choice`` type directly. +-------------+------------------------------------------------------------------------+ | Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) | +-------------+------------------------------------------------------------------------+ +| Overriden | - `choices`_ | +| Options | | ++-------------+------------------------------------------------------------------------+ | Inherited | - `multiple`_ | | options | - `expanded`_ | | | - `preferred_choices`_ | @@ -37,6 +40,18 @@ you should just use the ``choice`` type directly. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\LanguageType` | +-------------+------------------------------------------------------------------------+ +Overriden 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 ----------------- diff --git a/reference/forms/types/locale.rst b/reference/forms/types/locale.rst index e8a970dca5d..9bb23293071 100644 --- a/reference/forms/types/locale.rst +++ b/reference/forms/types/locale.rst @@ -24,6 +24,9 @@ you should just use the ``choice`` type directly. +-------------+------------------------------------------------------------------------+ | Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) | +-------------+------------------------------------------------------------------------+ +| Overriden | - `choices`_ | +| Options | | ++-------------+------------------------------------------------------------------------+ | Inherited | - `multiple`_ | | options | - `expanded`_ | | | - `preferred_choices`_ | @@ -38,6 +41,19 @@ you should just use the ``choice`` type directly. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\LanguageType` | +-------------+------------------------------------------------------------------------+ +Overriden Options +----------------- + +choices +~~~~~~~ + +**default**: :method:`Symfony\\Component\\Locale\\Locale::getDisplayLocales` + +The choices option defaults to all locales returned by +:method:`Symfony\\Component\\Locale\\Locale::getDisplayLocales`. It uses the +default locale to specify the language. + + Inherited options ----------------- diff --git a/reference/forms/types/repeated.rst b/reference/forms/types/repeated.rst index 95aec9456bd..9ced36df6b7 100644 --- a/reference/forms/types/repeated.rst +++ b/reference/forms/types/repeated.rst @@ -17,6 +17,9 @@ accuracy. | | - `first_name`_ | | | - `second_name`_ | +-------------+------------------------------------------------------------------------+ +| Overriden | - `error_bubbling`_ | +| Options | | ++-------------+------------------------------------------------------------------------+ | Inherited | - `invalid_message`_ | | options | - `invalid_message_parameters`_ | | | - `error_bubbling`_ | @@ -136,6 +139,14 @@ second_name The same as ``first_name``, but for the second field. +Overriden Options +----------------- + +error_bubbling +~~~~~~~~~~~~~~ + +**default**: ``false`` + Inherited options ----------------- diff --git a/reference/forms/types/time.rst b/reference/forms/types/time.rst index 8568b8905a5..7838715f2ca 100644 --- a/reference/forms/types/time.rst +++ b/reference/forms/types/time.rst @@ -24,6 +24,9 @@ as a ``DateTime`` object, a string, a timestamp or an array. | | - `data_timezone`_ | | | - `user_timezone`_ | +----------------------+-----------------------------------------------------------------------------+ +| Overriden Options | - `by_reference`_ | +| | - `error_bubbling`_ | ++----------------------+-----------------------------------------------------------------------------+ | Inherited | - `invalid_message`_ | | options | - `invalid_message_parameters`_ | +----------------------+-----------------------------------------------------------------------------+ @@ -108,6 +111,21 @@ this format. .. include:: /reference/forms/types/options/user_timezone.rst.inc +Overriden Options +----------------- + +by_reference +~~~~~~~~~~~~ + +**default**: ``false`` + +The ``DateTime`` classes are treated as immutable objects. + +error_bubbling +~~~~~~~~~~~~~~ + +**default**: ``false`` + Inherited options ----------------- @@ -115,4 +133,4 @@ These options inherit from the :doc:`field` type: .. include:: /reference/forms/types/options/invalid_message.rst.inc -.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc \ No newline at end of file +.. include:: /reference/forms/types/options/invalid_message_parameters.rst.inc diff --git a/reference/forms/types/timezone.rst b/reference/forms/types/timezone.rst index ccb4a4ef859..51de3fd33fe 100644 --- a/reference/forms/types/timezone.rst +++ b/reference/forms/types/timezone.rst @@ -18,6 +18,9 @@ you should just use the ``choice`` type directly. +-------------+------------------------------------------------------------------------+ | Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) | +-------------+------------------------------------------------------------------------+ +| Overriden | - `choice_list`_ | +| Options | | ++-------------+------------------------------------------------------------------------+ | Inherited | - `multiple`_ | | options | - `expanded`_ | | | - `preferred_choices`_ | @@ -32,6 +35,17 @@ you should just use the ``choice`` type directly. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\TimezoneType` | +-------------+------------------------------------------------------------------------+ +Overriden Options +----------------- + +choice_list +~~~~~~~~~~~ + +**default**: :class:`Symfony\\Component\\Form\\Extension\\Core\\ChoiceList\\TimezoneChoiceList` + +The Timezone type defaults the choice_list to all timezones returned by +:phpmethod:`DateTimeZone::listIdentifiers`, broken down by continent. + Inherited options -----------------