Skip to content

Commit c545e17

Browse files
committed
Fix some mistakes
1 parent 07063b6 commit c545e17

18 files changed

+38
-40
lines changed

best_practices/security.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ be reused in other parts of the application. Imagine that you want to add
161161
a link in a template that will only be seen by authors. Right now you'll
162162
need to repeat the expression code using Twig syntax:
163163

164-
.. code-block:: html+jinja
164+
.. code-block:: html+twig
165165

166166
{% if app.user and app.user.email == post.authorEmail %}
167167
<a href=""> ... </a>
@@ -203,7 +203,7 @@ Now you can reuse this method both in the template and in the security expressio
203203
// ...
204204
}
205205

206-
.. code-block:: html+jinja
206+
.. code-block:: html+twig
207207

208208
{% if post.isAuthor(app.user) %}
209209
<a href=""> ... </a>

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

components/serializer.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ There are several types of normalizers available:
578578
calling the constructor during the denormalization process.
579579

580580
Objects are normalized to a map of property names and values (names are
581-
generated removing the ``get``, ``set``, ``has`` or ``remove`` prefix from
581+
generated removing the ``get``, ``set``, ``has``, ``is`` or ``remove`` prefix from
582582
the method name and lowercasing the first letter; e.g. ``getFirstName()`` ->
583583
``firstName``).
584584

@@ -936,9 +936,7 @@ Use the special ``#`` key to define the data of a node::
936936
// is encoded as follows:
937937
// <?xml version="1.0"?>
938938
// <response>
939-
// <foo bar="value">
940-
// baz
941-
// </foo>
939+
// <foo bar="value">baz</foo>
942940
// </response>
943941

944942
Context

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

email.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ To keep things decoupled, the email body has been stored in a template and
138138
rendered with the ``renderView()`` method. The ``registration.html.twig``
139139
template might look something like this:
140140

141-
.. code-block:: html+jinja
141+
.. code-block:: html+twig
142142

143143
{# app/Resources/views/Emails/registration.html.twig #}
144144
<h3>You did it! You registered!</h3>

form/create_custom_field_type.rst

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

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

form/form_customization.rst

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

4748
To quickly prototype and test a form, you can render the entire form with
@@ -720,7 +721,7 @@ Customizing the "Form Row"
720721
~~~~~~~~~~~~~~~~~~~~~~~~~~
721722

722723
When you can manage it, the easiest way to render a form field is via the
723-
``form_row()`` function, which renders the label, errors and HTML widget of
724+
``form_row()`` function, which renders the label, errors, help and HTML widget of
724725
a field. To customize the markup used for rendering *all* form field rows,
725726
override the ``form_row`` fragment. For example, suppose you want to add a
726727
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/configuration/framework.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,7 @@ ships with multiple adapters: ``cache.adapter.apcu``, ``cache.adapter.doctrine``
19361936
given the adapter they are based on. Internally, a pool wraps the definition
19371937
of an adapter.
19381938

1939-
.. _reference-cache-systen:
1939+
.. _reference-cache-system:
19401940

19411941
system
19421942
......

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
@@ -297,7 +297,7 @@ callback
297297

298298
**type**: ``string|array|Closure``
299299

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

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. |

security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ You can also use expressions inside your templates:
941941

942942
.. configuration-block::
943943

944-
.. code-block:: html+jinja
944+
.. code-block:: html+twig
945945

946946
{% if is_granted(expression(
947947
'"ROLE_ADMIN" in roles or (not is_anonymous() and user.isSuperAdmin())'

serializer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Enabling the Metadata Cache
233233

234234
Metadata used by the Serializer component such as groups can be cached to
235235
enhance application performance. By default, the serializer uses the ``cache.system``
236-
cache pool which is configured using the :ref:`cache.system <reference-cache-systen>`
236+
cache pool which is configured using the :ref:`cache.system <reference-cache-system>`
237237
option.
238238

239239
Enabling a Name Converter

templating.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ being used and generating the correct paths accordingly.
660660
If you need absolute URLs for assets, use the ``absolute_url()`` Twig function
661661
as follows:
662662

663-
.. code-block:: html+jinja
663+
.. code-block:: html+twig
664664

665665
<img src="{{ absolute_url(asset('images/logo.png')) }}" alt="Symfony!" />
666666

validation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ message:
151151

152152
.. code-block:: text
153153
154-
AppBundle\Entity\Author.name:
154+
Object(AppBundle\Entity\Author).name:
155155
This value should not be blank
156156
157157
If you insert a value into the ``name`` property, the happy success message

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)