From fe3dc515df934b465aa834476972e5dff0633673 Mon Sep 17 00:00:00 2001 From: Greg Quat Date: Thu, 1 Mar 2012 12:45:19 +0100 Subject: [PATCH 1/2] Fix typo in /reference/forms/types/language.rst --- reference/forms/types/language.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/forms/types/language.rst b/reference/forms/types/language.rst index 6b1c6efcd31..88296b8873d 100644 --- a/reference/forms/types/language.rst +++ b/reference/forms/types/language.rst @@ -8,7 +8,7 @@ The ``language`` type is a subset of the ``ChoiceType`` that allows the user to select from a large list of languages. As an added bonus, the language names are displayed in the language of the user. -The "value" for each locale is either the two letter ISO639-1 *language* code +The "value" for each locale is the two-letter ISO639-1 *language* code (e.g. ``fr``). .. note:: From 70ea8415f5cbb2d41644dc8e45c3d0b6ccfc3178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Quatannens?= Date: Sat, 6 Jul 2013 19:16:58 +0200 Subject: [PATCH 2/2] Fixing mishandling (sorry) --- reference/forms/types/country.rst | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/reference/forms/types/country.rst b/reference/forms/types/country.rst index 020e6766f94..bf30de44364 100644 --- a/reference/forms/types/country.rst +++ b/reference/forms/types/country.rst @@ -12,7 +12,7 @@ The "value" for each country is the two-letter country code. .. note:: - The locale of your user is guessed using `Locale::getDefault()`_ + The locale of your user is guessed using :phpmethod:`Locale::getDefault` Unlike the ``choice`` type, you don't need to specify a ``choices`` or ``choice_list`` option as the field type automatically uses all of the countries @@ -22,20 +22,37 @@ 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`_ | | | - `empty_value`_ | | | - `error_bubbling`_ | +| | - `error_mapping`_ | | | - `required`_ | | | - `label`_ | | | - `read_only`_ | +| | - `disabled`_ | +| | - `mapped`_ | +-------------+-----------------------------------------------------------------------+ | Parent type | :doc:`choice` | +-------------+-----------------------------------------------------------------------+ | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CountryType` | +-------------+-----------------------------------------------------------------------+ +Overridden Options +------------------ + +choices +~~~~~~~ + +**default**: ``Symfony\Component\Intl\Intl::getRegionBundle()->getCountryNames()`` + +The country type defaults the ``choices`` option to the whole list of countries. +The locale is used to translate the countries names. + Inherited options ----------------- @@ -51,7 +68,9 @@ These options inherit from the :doc:`choice` type .. include:: /reference/forms/types/options/error_bubbling.rst.inc -These options inherit from the :doc:`field` type: +.. include:: /reference/forms/types/options/error_mapping.rst.inc + +These options inherit from the :doc:`date` type: .. include:: /reference/forms/types/options/required.rst.inc @@ -59,4 +78,6 @@ These options inherit from the :doc:`field` type: .. include:: /reference/forms/types/options/read_only.rst.inc -.. _`Locale::getDefault()`: http://php.net/manual/en/locale.getdefault.php +.. include:: /reference/forms/types/options/disabled.rst.inc + +.. include:: /reference/forms/types/options/mapped.rst.inc