Skip to content

Commit 50cd5c3

Browse files
committed
[#2557] Minor tweaks to bind -> submit change
1 parent 8a03f2e commit 50cd5c3

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

book/forms.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ controller::
227227
The :method:`Symfony\Component\Form\FormInterface::handleRequest` method was
228228
added in Symfony 2.3. Previously, the ``$request`` was passed to the
229229
``submit`` method - a strategy which is deprecated and will be removed
230-
in Symfony 3.0. For details on that method, see :doc:`/cookbook/form/direct_submit`.
230+
in Symfony 3.0. For details on that method, see :ref:`cookbook-form-submit-request`.
231231

232232
This controller follows a common pattern for handling forms, and has three
233233
possible paths:

cookbook/form/direct_submit.rst

+9-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
How to use the submit() Function to handle Form Submissions
55
===========================================================
66

7+
.. versionadded::
8+
Before Symfony 2.3, the ``submit`` method was known as ``bind``.
9+
710
In Symfony 2.3, a new :method:`Symfony\Component\Form\FormInterface::handleRequest`
811
method was added, which makes handling form submissions easier than ever::
912

@@ -75,11 +78,16 @@ method, pass the submitted data directly to
7578

7679
$form->get('firstName')->submit('Fabien');
7780

81+
.. _cookbook-form-submit-request:
82+
7883
Passing a Request to Form::submit() (deprecated)
7984
------------------------------------------------
8085

86+
.. versionadded::
87+
Before Symfony 2.3, the ``submit`` method was known as ``bind``.
88+
8189
Before Symfony 2.3, the :method:`Symfony\Component\Form\FormInterface::submit`
82-
method accepted a :class:`Symfony\\Component\\HttpFoundation\\Reuqest` object as
90+
method accepted a :class:`Symfony\\Component\\HttpFoundation\\Request` object as
8391
a convenient shortcut to the previous example::
8492

8593
use Symfony\Component\HttpFoundation\Request;

cookbook/map.rst.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
* :doc:`/cookbook/form/inherit_data_option`
8888
* :doc:`/cookbook/form/unit_testing`
8989
* :doc:`/cookbook/form/use_empty_data`
90-
* :doc:`/cookbook/form/direct_bind`
90+
* :doc:`/cookbook/form/direct_submit`
9191
* (validation) :doc:`/cookbook/validation/custom_constraint`
9292
* (doctrine) :doc:`/cookbook/doctrine/file_uploads`
9393

reference/forms/types/options/by_reference.rst.inc

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ To explain this further, here's a simple example::
2020
)
2121

2222
If ``by_reference`` is true, the following takes place behind the scenes
23-
when you call ``bind`` on the form::
23+
when you call ``submit`` (or ``handleRequest``) on the form::
2424

2525
$article->setTitle('...');
2626
$article->getAuthor()->setName('...');
2727
$article->getAuthor()->setEmail('...');
2828

2929
Notice that ``setAuthor`` is not called. The author is modified by reference.
3030

31-
If you set ``by_reference`` to false, binding looks like this::
31+
If you set ``by_reference`` to false, submitting looks like this::
3232

3333
$article->setTitle('...');
3434
$author = $article->getAuthor();

0 commit comments

Comments
 (0)