8000 Merge branch '2.7' into 2.8 · symfony/symfony-docs@d09611e · GitHub
[go: up one dir, main page]

Skip to content

Commit d09611e

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Made unmapped field example in forms chapter more descriptive [#7507] fix namespace
2 parents a4fa352 + dcad7f1 commit d09611e

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

forms.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,8 @@ the choice is ultimately up to you.
685685
{
686686
$builder
687687
->add('task')
688-
->add('dueDate', null, array('mapped' => false))
688+
->add('dueDate')
689+
->add('agreeTerms', CheckboxType::class, array('mapped' => false))
689690
->add('save', SubmitType::class)
690691
;
691692
}
@@ -695,11 +696,11 @@ the choice is ultimately up to you.
695696

696697
The field data can be accessed in a controller with::
697698

698-
$form->get('dueDate')->getData();
699+
$form->get('agreeTerms')->getData();
699700

700701
In addition, the data of an unmapped field can also be modified directly::
701702

702-
$form->get('dueDate')->setData(new \DateTime());
703+
$form->get('agreeTerms')->setData(true);
703704

704705
Final Thoughts
705706
--------------

testing/http_authentication.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ but the following example shows a complete example that you can adapt to your
8181
needs::
8282

8383
// src/AppBundle/Tests/Controller/DefaultControllerTest.php
84-
namespace Appbundle\Tests\Controller;
84+
namespace AppBundle\Tests\Controller;
8585

8686
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
8787
use Symfony\Component\BrowserKit\Cookie;

0 commit comments

Comments
 (0)
0