Commit 33e6b153 authored by Fabien Potencier's avatar Fabien Potencier

minor #1399 Added argument description to twig asset() method (DaveC49)

This PR was squashed before being merged into the 2.2.x-dev branch (closes #1399).

Discussion
----------

Added argument description to twig asset() method

I have added a description of the arguments for the asset() method. I didn't find them obvious when I first used the AssetServiceProvider, although it makes sense in hindsight. The description would have saved me some time getting the paths right

Commits
-------

2f5d870f Added argument description to twig asset() method
parents ef2c77de 2f5d870f
......@@ -55,7 +55,10 @@ Registering
Usage
-----
The AssetServiceProvider is mostly useful with the Twig provider:
The AssetServiceProvider is mostly useful with the Twig provider using the asset(method).
This has two string arguments. In the case of named packages, the first is the path relative to
the base_path specified in the package definition and the second is the package name. For unmamed
packages, there is only one argument, the path relative to the assets folder:
.. code-block:: jinja
......@@ -65,5 +68,7 @@ The AssetServiceProvider is mostly useful with the Twig provider:
{{ asset_version('/css/foo.png') }}
For more information, check out the `Asset Component documentation
<https://symfony.com/doc/current/components/asset/introduction.html>`_.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment