Skip to content

Commit 1956d54

Browse files
committed
Fix some mistakes
1 parent c12928f commit 1956d54

File tree

12 files changed

+31
-31
lines changed

12 files changed

+31
-31
lines changed

components/http_kernel.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ For general information on adding listeners to the events below, see
143143
As of 3.1 the :class:`Symfony\\Component\\HttpKernel\\HttpKernel` accepts a
144144
fourth argument, which must be an instance of
145145
:class:`Symfony\\Component\\HttpKernel\\Controller\\ArgumentResolverInterface`.
146-
In 4.0 this argument will become mandatory.
147146

148147
.. seealso::
149148

doctrine/lifecycle_callbacks.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ How to Work with Lifecycle Callbacks
66

77
Sometimes, you need to perform an action right before or after an entity
88
is inserted, updated, or deleted. These types of actions are known as "lifecycle"
9-
callbacks, as they're callback methods that you need to execute during different
9+
callbacks, as they're callback functions that you need to execute during different
1010
stages of the lifecycle of an entity (e.g. the entity is inserted, updated,
1111
deleted, etc).
1212

form/create_custom_field_type.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ link for details), create a ``shipping_widget`` block to handle this:
146146

147147
You can further customize the template used to render each children of the
148148
choice type. The block to override in that case is named "block name" +
149-
``_entry`` + "element name" (``label``, ``errors`` or ``widget``) (e.g. to
149+
``_entry_`` + "element name" (``label``, ``errors`` or ``widget``) (e.g. to
150150
customize the labels of the children of the Shipping widget you'd need to
151151
define ``{% block shipping_entry_label %} ... {% endblock %}``).
152152

form/form_customization.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ above templates would render:
4343
<li>This field is required</li>
4444
</ul>
4545
<input type="number" id="form_age" name="form[age]" />
46+
<p id="form_age_help" class="help-text">One help note.</p>
4647
</div>
4748

4849
To quickly prototype and test a form, you can render the entire form with
@@ -718,7 +719,7 @@ Customizing the "Form Row"
718719
~~~~~~~~~~~~~~~~~~~~~~~~~~
719720

720721
When you can manage it, the easiest way to render a form field is via the
721-
``form_row()`` function, which renders the label, errors and HTML widget of
722+
``form_row()`` function, which renders the label, errors, help and HTML widget of
722723
a field. To customize the markup used for rendering *all* form field rows,
723724
override the ``form_row`` fragment. For example, suppose you want to add a
724725
class to the ``div`` element around each row:

form/rendering.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ output can be customized on many different levels.
3939

4040
.. code-block:: twig
4141
42-
{{ form.vars.value.task }}
42+
{{ form.task.vars.value }}
4343
4444
.. index::
4545
single: Forms; Rendering each field by hand

reference/constraints/Callback.rst

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@ on your object. If you're using validation with forms, this means that you
77
can make these custom errors display next to a specific field, instead of
88
simply at the top of your form.
99

10-
This process works by specifying one or more *callback* methods, each of
11-
which will be called during the validation process. Each of those methods
10+
This process works by specifying one or more *callback* functions, each of
11+
which will be called during the validation process. Each of those functions
1212
can do anything, including creating and assigning validation errors.
1313

1414
.. note::
1515

16-
A callback method itself doesn't *fail* or return any value. Instead,
17-
as you'll see in the example, a callback method has the ability to directly
16+
A callback function itself doesn't *fail* or return any value. Instead,
17+
as you'll see in the example, a callback function has the ability to directly
1818
add validator "violations".
1919

20-
+----------------+------------------------------------------------------------------------+
21-
| Applies to | :ref:`class <validation-class-target>` |
22-
+----------------+------------------------------------------------------------------------+
23-
| Options | - :ref:`callback <callback-option>` |
24-
| | - `payload`_ |
25-
+----------------+------------------------------------------------------------------------+
26-
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Callback` |
27-
+----------------+------------------------------------------------------------------------+
28-
| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\CallbackValidator` |
29-
+----------------+------------------------------------------------------------------------+
20+
+----------------+-----------------------------------------------------------------------------------------------+
21+
| Applies to | :ref:`class <validation-class-target>` or :ref:`property/method <validation-property-target>` |
22+
+----------------+-----------------------------------------------------------------------------------------------+
23+
| Options | - :ref:`callback <callback-option>` |
24+
| | - `payload`_ |
25+
+----------------+-----------------------------------------------------------------------------------------------+
26+
| Class | :class:`Symfony\\Component\\Validator\\Constraints\\Callback` |
27+
+----------------+-----------------------------------------------------------------------------------------------+
28+
| Validator | :class:`Symfony\\Component\\Validator\\Constraints\\CallbackValidator` |
29+
+----------------+-----------------------------------------------------------------------------------------------+
3030

3131
Configuration
3232
-------------
@@ -88,10 +88,10 @@ Configuration
8888
}
8989
}
9090
91-
The Callback Method
92-
-------------------
91+
The Callback Function
92+
---------------------
9393

94-
The callback method is passed a special ``ExecutionContextInterface`` object.
94+
The callback function is passed a special ``ExecutionContextInterface`` object.
9595
You can set "violations" directly on this object and determine to which
9696
field those errors should be attributed::
9797

@@ -260,7 +260,7 @@ callback
260260
**type**: ``string``, ``array`` or ``Closure`` [:ref:`default option <validation-default-option>`]
261261

262262
The callback option accepts three different formats for specifying the
263-
callback method:
263+
callback function:
264264

265265
* A **string** containing the name of a concrete or static method;
266266

reference/constraints/Choice.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ callback
292292

293293
**type**: ``string|array|Closure``
294294

295-
This is a callback method that can be used instead of the `choices`_ option
295+
This is a callback function that can be used instead of the `choices`_ option
296296
to return the choices array. See
297297
`Supplying the Choices with a Callback Function`_ for details on its usage.
298298

reference/forms/twig_reference.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ form_row(view, variables)
152152
-------------------------
153153

154154
Renders the "row" of a given field, which is the combination of the field's
155-
label, errors and widget.
155+
label, errors, widget and help.
156156

157157
.. code-block:: twig
158158
@@ -339,7 +339,7 @@ done by using a public ``vars`` property on the
339339
| ``full_name`` | The ``name`` HTML attribute to be rendered. |
340340
+------------------------+-------------------------------------------------------------------------------------+
341341
| ``errors`` | An array of any errors attached to *this* specific field |
342-
| | (e.g. ``form.title.errors``). |
342+
| | (e.g. ``form.title.vars.errors``). |
343343
| | Note that you can't use ``form.errors`` to determine if a form is valid, |
344344
| | since this only returns "global" errors: some individual fields may have errors. |
345345
| | Instead, use the ``valid`` option. |

templating.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ Template Naming and Locations
313313
By default, templates can live in two different locations:
314314

315315
``templates/``
316-
The application's ``views`` directory can contain application-wide base templates
316+
This directory can contain application-wide base templates
317317
(i.e. your application's layouts and templates of the application bundle) as
318318
well as templates that :ref:`override third party bundle templates <override-templates>`.
319319

validation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ message:
161161

162162
.. code-block:: text
163163
164-
App\Entity\Author.name:
165-
This value should not be blank
164+
Object(App\Entity\Author).name:
165+
This value should not be blank (code c1051bb4-d103-4f74-8988-acbcafc7fdc3)
166166
167167
If you insert a value into the ``name`` property, the happy success message
168168
will appear.

validation/groups.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ With this configuration, there are three validation groups:
142142
``registration``
143143
Contains the constraints on the ``email`` and ``password`` fields only.
144144

145-
Constraints in the ``Default`` group of a class are the constraints that have
145+
Constraints in the ``User`` group of a class are the constraints that have
146146
either no explicit group configured or that are configured to a group equal to
147147
the class name or the string ``Default``.
148148

validation/severity.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ method. Each constraint exposes the attached payload as a public property::
142142
For example, you can leverage this to customize the ``form_errors`` block
143143
so that the severity is added as an additional HTML class:
144144

145-
.. code-block:: html+jinja
145+
.. code-block:: html+twig
146146

147147
{%- block form_errors -%}
148148
{%- if errors|length > 0 -%}

0 commit comments

Comments
 (0)