From 1b7318cfb81ccc4422bacda8107e2481aeb46dc1 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 8 Mar 2019 09:38:42 +0100 Subject: [PATCH] Fixed some misc issues --- best_practices/security.rst | 4 ++-- components/serializer.rst | 2 +- email.rst | 2 +- form/create_custom_field_type.rst | 2 +- reference/configuration/framework.rst | 2 +- security.rst | 2 +- serializer.rst | 2 +- templating.rst | 2 +- validation.rst | 2 +- validation/severity.rst | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/best_practices/security.rst b/best_practices/security.rst index 4536cf14ea0..293a4c78b0b 100644 --- a/best_practices/security.rst +++ b/best_practices/security.rst @@ -160,7 +160,7 @@ be reused in other parts of the application. Imagine that you want to add a link in a template that will only be seen by authors. Right now you'll need to repeat the expression code using Twig syntax: -.. code-block:: html+jinja +.. code-block:: html+twig {% if app.user and app.user.email == post.authorEmail %} ... @@ -202,7 +202,7 @@ Now you can reuse this method both in the template and in the security expressio // ... } -.. code-block:: html+jinja +.. code-block:: html+twig {% if post.isAuthor(app.user) %} ... diff --git a/components/serializer.rst b/components/serializer.rst index f74d0d457a7..1c26ec80819 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -578,7 +578,7 @@ There are several types of normalizers available: calling the constructor during the denormalization process. Objects are normalized to a map of property names and values (names are - generated removing the ``get``, ``set``, ``has`` or ``remove`` prefix from + generated removing the ``get``, ``set``, ``has``, ``is`` or ``remove`` prefix from the method name and lowercasing the first letter; e.g. ``getFirstName()`` -> ``firstName``). diff --git a/email.rst b/email.rst index ed26b35fec6..047917b9595 100644 --- a/email.rst +++ b/email.rst @@ -138,7 +138,7 @@ To keep things decoupled, the email body has been stored in a template and rendered with the ``renderView()`` method. The ``registration.html.twig`` template might look something like this: -.. code-block:: html+jinja +.. code-block:: html+twig {# app/Resources/views/Emails/registration.html.twig #}

You did it! You registered!

diff --git a/form/create_custom_field_type.rst b/form/create_custom_field_type.rst index e409f6b6c2c..d7c2ac84ed5 100644 --- a/form/create_custom_field_type.rst +++ b/form/create_custom_field_type.rst @@ -153,7 +153,7 @@ link for details), create a ``shipping_widget`` block to handle this: You can further customize the template used to render each children of the choice type. The block to override in that case is named "block name" + - ``_entry`` + "element name" (``label``, ``errors`` or ``widget``) (e.g. to + ``_entry_`` + "element name" (``label``, ``errors`` or ``widget``) (e.g. to customize the labels of the children of the Shipping widget you'd need to define ``{% block shipping_entry_label %} ... {% endblock %}``). diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 943962e5247..b072698b656 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -1973,7 +1973,7 @@ ships with multiple adapters: ``cache.adapter.apcu``, ``cache.adapter.doctrine`` given the adapter they are based on. Internally, a pool wraps the definition of an adapter. -.. _reference-cache-systen: +.. _reference-cache-system: system ...... diff --git a/security.rst b/security.rst index 7004107da73..4443a7ef33a 100644 --- a/security.rst +++ b/security.rst @@ -940,7 +940,7 @@ You can also use expressions inside your templates: .. configuration-block:: - .. code-block:: html+jinja + .. code-block:: html+twig {% if is_granted(expression( '"ROLE_ADMIN" in roles or (not is_anonymous() and user.isSuperAdmin())' diff --git a/serializer.rst b/serializer.rst index 462c1c06e04..566a2ee485e 100644 --- a/serializer.rst +++ b/serializer.rst @@ -233,7 +233,7 @@ Enabling the Metadata Cache Metadata used by the Serializer component such as groups can be cached to enhance application performance. By default, the serializer uses the ``cache.system`` -cache pool which is configured using the :ref:`cache.system ` +cache pool which is configured using the :ref:`cache.system ` option. Enabling a Name Converter diff --git a/templating.rst b/templating.rst index 795eef4439f..b94f4c11192 100644 --- a/templating.rst +++ b/templating.rst @@ -660,7 +660,7 @@ being used and generating the correct paths accordingly. If you need absolute URLs for assets, use the ``absolute_url()`` Twig function as follows: -.. code-block:: html+jinja +.. code-block:: html+twig Symfony! diff --git a/validation.rst b/validation.rst index d9c479b19aa..42d8a1b16d0 100644 --- a/validation.rst +++ b/validation.rst @@ -151,7 +151,7 @@ message: .. code-block:: text - AppBundle\Entity\Author.name: + Object(AppBundle\Entity\Author).name: This value should not be blank If you insert a value into the ``name`` property, the happy success message diff --git a/validation/severity.rst b/validation/severity.rst index 773f60df02e..e34a06670ff 100644 --- a/validation/severity.rst +++ b/validation/severity.rst @@ -142,7 +142,7 @@ method. Each constraint exposes the attached payload as a public property:: For example, you can leverage this to customize the ``form_errors`` block so that the severity is added as an additional HTML class: -.. code-block:: html+jinja +.. code-block:: html+twig {%- block form_errors -%} {%- if errors|length > 0 -%}