diff --git a/book/templating.rst b/book/templating.rst index 4d99b4dc9bc..41202fe8c92 100644 --- a/book/templating.rst +++ b/book/templating.rst @@ -1202,15 +1202,22 @@ instance which will give you access to some application specific variables automatically: ``app.security`` - The security context. + The :class:`Symfony\\Component\\Security\\Core\\SecurityContext` object or + ``null`` if there is none. ``app.user`` - The current user object. + The representation of the current user or ``null`` if there is none. The + value stored in this variable can be a :class:`Symfony\\Component\\Security\\Core\\User\\UserInterface` + object, any other object which implements a ``__toString()`` method or even + a regular string. ``app.request`` - The request object. + The :class:`Symfony\\Component\\HttpFoundation\\Request` object that represents + the current request (depending on your application, this can be a sub-request + or a regular request, as explained later). ``app.session`` - The session object. + The :class:`Symfony\\Component\\HttpFoundation\\Session\\Session` object that + represents the current user's session or ``null`` if there is none. ``app.environment`` - The current environment (dev, prod, etc). + The name of the current environment (``dev``, ``prod``, etc). ``app.debug`` True if in debug mode. False otherwise.