Skip to content

Commit 815e0bf

Browse files
committed
minor #4551 Normalize the method listings on version 2.5 (pedronofuentes)
This PR was squashed before being merged into the 2.5 branch (closes #4551). Discussion ---------- Normalize the method listings on version 2.5 | Q | A | ------------- | --- | Doc fix? | no | New docs? | no | Applies to | 2.5 | Fixed tickets | #3903 This pull request is related with #4539. Normalizes listings from 2.5 Commits ------- 2665407 Normalize the method listings on version 2.5
2 parents c5d2eb8 + 2665407 commit 815e0bf

File tree

3 files changed

+35
-25
lines changed

3 files changed

+35
-25
lines changed

Diff for: book/routing.rst

+6-4
Original file line numberDiff line numberDiff line change
@@ -967,10 +967,12 @@ header matches ``firefox``.
967967
You can do any complex logic you need in the expression by leveraging two
968968
variables that are passed into the expression:
969969

970-
* ``context``: An instance of :class:`Symfony\\Component\\Routing\\RequestContext`,
971-
which holds the most fundamental information about the route being matched;
972-
* ``request``: The Symfony :class:`Symfony\\Component\\HttpFoundation\\Request`
973-
object (see :ref:`component-http-foundation-request`).
970+
``context``
971+
An instance of :class:`Symfony\\Component\\Routing\\RequestContext`, which
972+
holds the most fundamental information about the route being matched.
973+
``request``
974+
The Symfony :class:`Symfony\\Component\\HttpFoundation\\Request` object
975+
(see :ref:`component-http-foundation-request`).
974976

975977
.. caution::
976978

Diff for: book/security.rst

+25-19
Original file line numberDiff line numberDiff line change
@@ -1922,28 +1922,34 @@ syntax, see :doc:`/components/expression_language/syntax`.
19221922

19231923
Inside the expression, you have access to a number of variables:
19241924

1925-
* ``user`` The user object (or the string ``anon`` if you're not authenticated);
1926-
* ``roles`` The array of roles the user has, including from the
1927-
:ref:`role hierarchy <book-security-role-hierarchy>` but not including
1928-
the ``IS_AUTHENTICATED_*`` attributes (see the functions below);
1929-
* ``object``: The object (if any) that's passed as the second argument to
1930-
``isGranted`` ;
1931-
* ``token`` The token object;
1932-
* ``trust_resolver``: The :class:`Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationTrustResolverInterface`,
1933-
object: you'll probably use the ``is_*`` functions below instead.
1925+
``user``
1926+
The user object (or the string ``anon`` if you're not authenticated).
1927+
``roles``
1928+
The array of roles the user has, including from the
1929+
:ref:`role hierarchy <book-security-role-hierarchy>` but not including the
1930+
``IS_AUTHENTICATED_*`` attributes (see the functions below).
1931+
``object``
1932+
The object (if any) that's passed as the second argument to ``isGranted``.
1933+
``token``
1934+
The token object.
1935+
``trust_resolver``
1936+
The :class:`Symfony\\Component\\Security\\Core\\Authentication\\AuthenticationTrustResolverInterface`,
1937+
object: you'll probably use the ``is_*`` functions below instead.
19341938

19351939
Additionally, you have access to a number of functions inside the expression:
19361940

1937-
* ``is_authenticated``: Returns ``true`` if the user is authenticated via "remember-me"
1938-
or authenticated "fully" - i.e. returns true if the user is "logged in";
1939-
* ``is_anonymous``: Equal to using ``IS_AUTHENTICATED_ANONYMOUSLY`` with
1940-
the ``isGranted`` function;
1941-
* ``is_remember_me``: Similar, but not equal to ``IS_AUTHENTICATED_REMEMBERED``,
1942-
see below;
1943-
* ``is_fully_authenticated``: Similar, but not equal to ``IS_AUTHENTICATED_FULLY``,
1944-
see below;
1945-
* ``has_role``: Checks to see if the user has the given role - equivalent
1946-
to an expression like ``'ROLE_ADMIN' in roles``.
1941+
``is_authenticated``
1942+
Returns ``true`` if the user is authenticated via "remember-me" or authenticated
1943+
"fully" - i.e. returns true if the user is "logged in".
1944+
``is_anonymous``
1945+
Equal to using ``IS_AUTHENTICATED_ANONYMOUSLY`` with the ``isGranted`` function.
1946+
``is_remember_me``
1947+
Similar, but not equal to ``IS_AUTHENTICATED_REMEMBERED``, see below.
1948+
``is_fully_authenticated``
1949+
Similar, but not equal to ``IS_AUTHENTICATED_FULLY``, see below.
1950+
``has_role``
1951+
Checks to see if the user has the given role - equivalent to an expression like
1952+
``'ROLE_ADMIN' in roles``.
19471953

19481954
.. sidebar:: ``is_remember_me`` is different than checking ``IS_AUTHENTICATED_REMEMBERED``
19491955

Diff for: book/service_container.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -673,8 +673,10 @@ To learn more about the expression language syntax, see :doc:`/components/expres
673673

674674
In this context, you have access to 2 functions:
675675

676-
* ``service`` - returns a given service (see the example above);
677-
* ``parameter`` - returns a specific parameter value (syntax is just like ``service``)
676+
``service``
677+
Returns a given service (see the example above).
678+
``parameter``
679+
Returns a specific parameter value (syntax is just like ``service``).
678680

679681
You also have access to the :class:`Symfony\\Component\\DependencyInjection\\ContainerBuilder`
680682
via a ``container`` variable. Here's another example:

0 commit comments

Comments
 (0)