block(
$form,
@@ -433,7 +433,7 @@ method:
The ``:form`` syntax is based on the functional names for templates:
``Bundle:Directory``. As the form directory lives in the
- ``app/Resources/views`` directory, the ``Bundle`` part is empty, resulting
+ ``templates/`` directory, the ``Bundle`` part is empty, resulting
in ``:form``.
Referencing base Form Blocks (Twig specific)
@@ -750,7 +750,7 @@ customize the ``name`` field only:
widget($form['name']); ?>
-
+
@@ -808,7 +808,7 @@ You can also override the markup for an entire field row using the same method:
row($form['name']); ?>
-
+
label($form) ?>
errors($form) ?>
diff --git a/form/form_dependencies.rst b/form/form_dependencies.rst
index b953156923f..b39b409538c 100644
--- a/form/form_dependencies.rst
+++ b/form/form_dependencies.rst
@@ -34,7 +34,7 @@ create your form::
use App\Form\TaskType;
// ...
- public function newAction()
+ public function new()
{
$em = $this->getDoctrine()->getManager();
diff --git a/form/form_themes.rst b/form/form_themes.rst
index 1d2123c6b71..dbc9f35bc0c 100644
--- a/form/form_themes.rst
+++ b/form/form_themes.rst
@@ -41,7 +41,7 @@ do this, create a new template file that will store the new markup:
.. code-block:: html+php
-
+
label($form, $label) ?>
errors($form) ?>
diff --git a/form/use_empty_data.rst b/form/use_empty_data.rst
index 482983ecdb1..1e30e3d0f3a 100644
--- a/form/use_empty_data.rst
+++ b/form/use_empty_data.rst
@@ -7,9 +7,9 @@ How to Configure empty Data for a Form Class
The ``empty_data`` option allows you to specify an empty data set for your
form class. This empty data set would be used if you submit your form, but
haven't called ``setData()`` on your form or passed in data when you created
-your form. For example::
+your form. For example, in a controller::
- public function indexAction()
+ public function index()
{
$blog = ...;
diff --git a/form/without_class.rst b/form/without_class.rst
index f40704b61e2..74ca8589999 100644
--- a/form/without_class.rst
+++ b/form/without_class.rst
@@ -15,7 +15,7 @@ an array of the submitted data. This is actually really easy::
use Symfony\Component\HttpFoundation\Request;
// ...
- public function contactAction(Request $request)
+ public function contact(Request $request)
{
$defaultData = array('message' => 'Type your message here');
$form = $this->createFormBuilder($defaultData)
@@ -102,7 +102,7 @@ but here's a short example:
If you are using validation groups, you need to either reference the
``Default`` group when creating the form, or set the correct group on
the constraint you are adding.
-
+
.. code-block:: php
new NotBlank(array('groups' => array('create', 'update')));
diff --git a/forms.rst b/forms.rst
index 6390e53896e..cb64643fc17 100644
--- a/forms.rst
+++ b/forms.rst
@@ -86,7 +86,7 @@ from inside a controller::
class DefaultController extends Controller
{
- public function newAction(Request $request)
+ public function new(Request $request)
{
// create a task and give it some dummy data for this example
$task = new Task();
@@ -221,7 +221,7 @@ your controller::
// ...
use Symfony\Component\HttpFoundation\Request;
- public function newAction(Request $request)
+ public function new(Request $request)
{
// just setup a fresh $task object (remove the dummy data)
$task = new Task();
@@ -338,7 +338,7 @@ object.
.. code-block:: yaml
- # src/Resources/config/validation.yml
+ # config/validation.yaml
App\Entity\Task:
properties:
task:
@@ -349,7 +349,7 @@ object.
.. code-block:: xml
-
+
createForm(TaskType::class, $task);
@@ -708,4 +708,3 @@ Learn more
.. _`Symfony Form component`: https://github.com/symfony/form
.. _`DateTime`: http://php.net/manual/en/class.datetime.php
-.. _`2.8 UPGRADE Log`: https://github.com/symfony/symfony/blob/2.8/UPGRADE-2.8.md#form