@@ -656,9 +656,6 @@ the relationship between the removed ``Tag`` and ``Task`` object.
656
656
updated (whether you're adding new tags or removing existing tags) on
657
657
each Tag object itself.
658
658
659
-
660
- .. _`Owning Side and Inverse Side` : http://docs.doctrine-project.org/en/latest/reference/unitofwork-associations.html
661
-
662
659
.. _cookbook-form-collections-custom-prototype
663
660
664
661
Render a custom prototype
@@ -669,17 +666,27 @@ and does not need to be changed. But if you are in the situation were
669
666
you need to have a complete custom prototype you can render it yourself:
670
667
671
668
.. code-block :: html+jinja
672
- data-prototype="{% filter escape %}{% include 'AcmeTaskBundle:Task: prototypeTask.html.twig' with { 'form': form.task.get('prototype') } %}{% endfilter %}"
669
+
670
+ data-prototype="{% filter escape %}
671
+ {% include 'AcmeTaskBundle:Task: prototypeTask.html.twig'
672
+ with { 'form': form.task.get('prototype') }
673
+ %}
674
+ {% endfilter %}"
673
675
674
676
The included ``AcmeTaskBundle:Task:prototypeTask.html.twig `` contains the
675
677
markup used for the prototype. This way you can not only easily structure
676
678
your prototype-markup, you can also use this markup to render the
677
679
contents of the collection when it already holds items:
678
680
679
681
.. code-block :: html+jinja
682
+
680
683
{% for task in tasks %}
681
- {% include 'AcmeTaskBundle:Task: prototypeTask.html.twig' with { 'form': form.task.vars.form } %}
684
+ {% include 'AcmeTaskBundle:Task: prototypeTask.html.twig'
685
+ with { 'form': form.task.vars.form }
686
+ %}
682
687
{% endfor %}
683
688
684
689
This makes sure the displayed items are the same as the newly inserted
685
- from the prototype.
690
+ from the prototype.
691
+
692
+ .. _`Owning Side and Inverse Side` : http://docs.doctrine-project.org/en/latest/reference/unitofwork-associations.html
0 commit comments