From 97dd87ca2dddae53b9c2d70d1b6a512bc6458ba4 Mon Sep 17 00:00:00 2001 From: Joel Clermont Date: Sat, 30 Mar 2013 16:12:19 -0400 Subject: [PATCH] add notes on collection and entity field types regarding collections of entities and cookbook article --- reference/forms/types/collection.rst | 7 +++++++ reference/forms/types/entity.rst | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/reference/forms/types/collection.rst b/reference/forms/types/collection.rst index cc429f1d679..1083cc53a10 100644 --- a/reference/forms/types/collection.rst +++ b/reference/forms/types/collection.rst @@ -29,6 +29,13 @@ forms, which is useful when creating forms that expose one-to-many relationships | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CollectionType` | +-------------+-----------------------------------------------------------------------------+ +.. note:: + + If you are working with a collection of Doctrine entities, pay special + attention to the `allow_add`_, `allow_delete`_ and `by_reference`_ options. + You can also see a complete example in the cookbook article + :doc:`/cookbook/form/form_collections`. + Basic Usage ----------- diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index f2f7a2cfc9b..84c426d7def 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -115,6 +115,13 @@ These options inherit from the :doc:`choice` type .. include:: /reference/forms/types/options/multiple.rst.inc +.. note:: + + If you are working with a collection of Doctrine entities, it will be helpful + to read the documention for the :doc:`/reference/forms/types/collection` + as well. In addition, there is a complete example in the cookbook article + :doc:`/cookbook/form/form_collections`. + .. include:: /reference/forms/types/options/expanded.rst.inc .. include:: /reference/forms/types/options/preferred_choices.rst.inc