Skip to content

Commit

Permalink
feature #4980 [#4974] Added Twig loader priority Documentation (wizhi…
Browse files Browse the repository at this point in the history
…ppo)

This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #4980).

Discussion
----------

[#4974] Added Twig loader priority Documentation

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | no (document extended feature)
| Applies to    | 2.7+
| Fixed tickets | #4974

Commits
-------

7d02f82 Added Twig loader priority Documentation
  • Loading branch information
weaverryan committed Feb 24, 2015
2 parents 89e626f + 7d02f82 commit 16dcf53
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions reference/dic_tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ the new loader and tag it with ``twig.loader``:
acme.demo_bundle.loader.some_twig_loader:
class: Acme\DemoBundle\Loader\SomeTwigLoader
tags:
- { name: twig.loader }
- { name: twig.loader, priority: 0 }
.. code-block:: xml
Expand All @@ -1351,7 +1351,7 @@ the new loader and tag it with ``twig.loader``:
id="acme.demo_bundle.loader.some_twig_loader"
class="Acme\DemoBundle\Loader\SomeTwigLoader">
<tag name="twig.loader" />
<tag name="twig.loader" priority="0" />
</service>
</services>
</container>
Expand All @@ -1360,9 +1360,14 @@ the new loader and tag it with ``twig.loader``:
$container
->register('acme.demo_bundle.loader.some_twig_loader', 'Acme\DemoBundle\Loader\SomeTwigLoader')
->addTag('twig.loader')
->addTag('twig.loader', array('priority' => 0))
;
.. note::
The ``priority`` value is optional and defaults to ``0``.
The higher priority loaders are tried first.
validator.constraint_validator
------------------------------
Expand Down

0 comments on commit 16dcf53

Please sign in to comment.