Skip to content

Commit c5ef24a

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: [Form] Renaming the article
2 parents fb57e4e + ca151ce commit c5ef24a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

form/form_collections.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
How to Embed a Collection of Forms
55
==================================
66

7-
In this article, you'll learn how to create a form that embeds a collection
8-
of many other forms. This could be useful, for example, if you had a ``Task``
9-
class and you wanted to edit/create/remove many ``Tag`` objects related to
10-
that Task, right inside the same form.
7+
Symfony Forms can embed a collection of many other forms, which is useful to
8+
edit related entities in a single form. In this article, you'll create a form to
9+
edit a ``Task`` class and, right inside the same form, you'll be able to edit,
10+
create and remove many ``Tag`` objects related to that Task.
1111

1212
Let's start by creating a ``Task`` entity::
1313

@@ -45,13 +45,14 @@ Let's start by creating a ``Task`` entity::
4545

4646
.. note::
4747

48-
The ``ArrayCollection`` is specific to Doctrine and is basically the
49-
same as using an ``array`` (but it must be an ``ArrayCollection`` if
50-
you're using Doctrine).
48+
The `ArrayCollection`_ is specific to Doctrine and is similar to a PHP array
49+
but provides many utility methods.
5150

5251
Now, create a ``Tag`` class. As you saw above, a ``Task`` can have many ``Tag``
5352
objects::
5453

54+
.. code-block:: php
55+
5556
// src/Entity/Tag.php
5657
namespace App\Entity;
5758
@@ -688,3 +689,4 @@ the relationship between the removed ``Tag`` and ``Task`` object.
688689
.. _`JSFiddle`: http://jsfiddle.net/847Kf/4/
689690
.. _`@a2lix/symfony-collection`: https://github.com/a2lix/symfony-collection
690691
.. _`symfony-collection`: https://github.com/ninsuo/symfony-collection
692+
.. _`ArrayCollection`: https://www.doctrine-project.org/projects/doctrine-collections/en/1.6/index.html

0 commit comments

Comments
 (0)