From d96b062cc72eb85179c92f87ece915fb5de5d1b2 Mon Sep 17 00:00:00 2001 From: Jules Pietri Date: Sun, 15 Mar 2020 18:43:48 +0100 Subject: [PATCH] [Form] Better explicit cloning with "by_reference" option --- reference/forms/types/options/by_reference.rst.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/options/by_reference.rst.inc b/reference/forms/types/options/by_reference.rst.inc index 3065cc9d9c5..2e95ae3a5df 100644 --- a/reference/forms/types/options/by_reference.rst.inc +++ b/reference/forms/types/options/by_reference.rst.inc @@ -41,8 +41,8 @@ If you set ``by_reference`` to false, submitting looks like this:: $author->setEmail('...'); $article->setAuthor($author); -So, all that ``by_reference=false`` really does is force the framework to -call the setter on the parent object. +So, all that ``by_reference=false`` really does is that it clones the object, +which enforces the framework to call the setter on the parent object. Similarly, if you're using the :doc:`CollectionType ` field where your underlying collection data is an object (like with