From 30a1495dd06575cc3671c75a5ae255f771eb58e6 Mon Sep 17 00:00:00 2001 From: Jules Pietri Date: Sat, 5 Mar 2016 21:50:19 +0100 Subject: [PATCH 1/4] [Form] reorder EntityType options --- reference/forms/types/entity.rst | 64 ++++++++++++++++---------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index 94de40e854a..e73cfa13845 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -12,26 +12,26 @@ objects from the database. +-------------+------------------------------------------------------------------+ | Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) | +-------------+------------------------------------------------------------------+ -| Options | - `class`_ | -| | - `choice_label`_ | -| | - `query_builder`_ | +| Options | - `choice_label`_ | +| | - `class`_ | | | - `em`_ | +| | - `query_builder`_ | +-------------+------------------------------------------------------------------+ | Overridden | - `choices`_ | | options | - `data_class`_ | +-------------+------------------------------------------------------------------+ | Inherited | from the :doc:`choice ` type: | | options | | -| | - `choice_value`_ | -| | - `choice_name`_ | | | - `choice_attr`_ | -| | - `placeholder`_ | +| | - `choice_name`_ | | | - `choice_translation_domain`_ | -| | - `translation_domain`_ | +| | - `choice_value`_ | | | - `expanded`_ | +| | - `group_by`_ | | | - `multiple`_ | +| | - `placeholder`_ | | | - `preferred_choices`_ | -| | - `group_by`_ | +| | - `translation_domain`_ | | | | | | from the :doc:`form ` type: | | | | @@ -108,15 +108,6 @@ then you can supply the ``choices`` option directly:: Field Options ------------- -class -~~~~~ - -**type**: ``string`` **required** - -The class of your entity (e.g. ``AcmeStoreBundle:Category``). This can be -a fully-qualified class name (e.g. ``Acme\StoreBundle\Entity\Category``) -or the short alias name (as shown prior). - choice_label ~~~~~~~~~~~~ @@ -161,16 +152,14 @@ more detais, see the main :ref:`choice_label ` docu 'choice_label' => 'translations[en].name', )); -query_builder -~~~~~~~~~~~~~ +class +~~~~~ -**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure +**type**: ``string`` **required** -If specified, this is used to query the subset of options (and their -order) that should be used for the field. The value of this option can -either be a ``QueryBuilder`` object or a Closure. If using a Closure, -it should take a single argument, which is the ``EntityRepository`` of -the entity and return an instance of ``QueryBuilder``. +The class of your entity (e.g. ``AcmeStoreBundle:Category``). This can be +a fully-qualified class name (e.g. ``Acme\StoreBundle\Entity\Category``) +or the short alias name (as shown prior). em ~~ @@ -180,6 +169,17 @@ em If specified, this entity manager will be used to load the choices instead of the ``default`` entity manager. +query_builder +~~~~~~~~~~~~~ + +**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure + +If specified, this is used to query the subset of options (and their +order) that should be used for the field. The value of this option can +either be a ``QueryBuilder`` object or a Closure. If using a Closure, +it should take a single argument, which is the ``EntityRepository`` of +the entity and return an instance of ``QueryBuilder``. + Overridden Options ------------------ @@ -206,20 +206,18 @@ Inherited Options These options inherit from the :doc:`choice ` type: -.. include:: /reference/forms/types/options/choice_value.rst.inc - -.. include:: /reference/forms/types/options/choice_name.rst.inc - .. include:: /reference/forms/types/options/choice_attr.rst.inc -.. include:: /reference/forms/types/options/placeholder.rst.inc +.. include:: /reference/forms/types/options/choice_name.rst.inc .. include:: /reference/forms/types/options/choice_translation_domain.rst.inc -.. include:: /reference/forms/types/options/choice_type_translation_domain.rst.inc +.. include:: /reference/forms/types/options/choice_value.rst.inc .. include:: /reference/forms/types/options/expanded.rst.inc +.. include:: /reference/forms/types/options/group_by.rst.inc + .. include:: /reference/forms/types/options/multiple.rst.inc .. note:: @@ -230,7 +228,7 @@ type: is a complete example in the cookbook article :doc:`/cookbook/form/form_collections`. -.. include:: /reference/forms/types/options/group_by.rst.inc +.. include:: /reference/forms/types/options/placeholder.rst.inc .. include:: /reference/forms/types/options/preferred_choices.rst.inc @@ -239,6 +237,8 @@ type: This option expects an array of entity objects, unlike the ``choice`` field that requires an array of keys. +.. include:: /reference/forms/types/options/choice_type_translation_domain.rst.inc + These options inherit from the :doc:`form ` type: From 95a3903de4941c7f371211b8ef181fe74ebb6695 Mon Sep 17 00:00:00 2001 From: Andrey Astakhov Date: Sun, 6 Mar 2016 22:26:40 +0100 Subject: [PATCH 2/4] Fixed yaml configuration of app.exception_controller --- cookbook/controller/error_pages.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/controller/error_pages.rst b/cookbook/controller/error_pages.rst index eeb20da4afe..e92f53bb711 100644 --- a/cookbook/controller/error_pages.rst +++ b/cookbook/controller/error_pages.rst @@ -233,8 +233,8 @@ In that case, you might want to override one or both of the ``showAction()`` and # app/config/services.yml services: app.exception_controller: - class: AppBundle\Controller\CustomExceptionController - arguments: ['@twig', '%kernel.debug%'] + class: AppBundle\Controller\CustomExceptionController + arguments: ['@twig', '%kernel.debug%'] .. code-block:: xml From 129c7077fb99c41ba91b69477a6e41daf3ab9203 Mon Sep 17 00:00:00 2001 From: gong023 Date: Sun, 6 Mar 2016 15:43:23 -0800 Subject: [PATCH 3/4] Fix configuration.rst typo `$ecret` seems to be typo --- cookbook/bundles/configuration.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cookbook/bundles/configuration.rst b/cookbook/bundles/configuration.rst index fed4e5c20eb..86a7c7a0426 100644 --- a/cookbook/bundles/configuration.rst +++ b/cookbook/bundles/configuration.rst @@ -75,7 +75,7 @@ bundle configuration would look like: acme_social: twitter: client_id: 123 - client_secret: $ecret + client_secret: $secret .. code-block:: xml @@ -88,7 +88,7 @@ bundle configuration would look like: http://symfony.com/schema/dic/services/services-1.0.xsd"> - + @@ -99,7 +99,7 @@ bundle configuration would look like: // app/config/config.php $container->loadFromExtension('acme_social', array( 'client_id' => 123, - 'client_secret' => '$ecret', + 'client_secret' => '$secret', )); .. seealso:: @@ -139,7 +139,7 @@ For the configuration example in the previous section, the array passed to your array( 'twitter' => array( 'client_id' => 123, - 'client_secret' => '$ecret', + 'client_secret' => '$secret', ), ), ) From c63c8269f36460946d2fa23ea666e92e6f05ce63 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Mon, 7 Mar 2016 23:26:44 +0100 Subject: [PATCH 4/4] [#6337] Change value of client_secret option --- cookbook/bundles/configuration.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cookbook/bundles/configuration.rst b/cookbook/bundles/configuration.rst index 86a7c7a0426..4c8746deda8 100644 --- a/cookbook/bundles/configuration.rst +++ b/cookbook/bundles/configuration.rst @@ -75,7 +75,7 @@ bundle configuration would look like: acme_social: twitter: client_id: 123 - client_secret: $secret + client_secret: your_secret .. code-block:: xml @@ -88,7 +88,7 @@ bundle configuration would look like: http://symfony.com/schema/dic/services/services-1.0.xsd"> - + @@ -99,7 +99,7 @@ bundle configuration would look like: // app/config/config.php $container->loadFromExtension('acme_social', array( 'client_id' => 123, - 'client_secret' => '$secret', + 'client_secret' => 'your_secret', )); .. seealso::