File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1337,7 +1337,7 @@ the new loader and tag it with ``twig.loader``:
1337
1337
acme.demo_bundle.loader.some_twig_loader:
1338
1338
class: Acme\DemoBundle\Loader\SomeTwigLoader
1339
1339
tags:
1340
- - { name: twig.loader }
1340
+ - { name: twig.loader, priority: 0 }
1341
1341
1342
1342
.. code-block:: xml
1343
1343
@@ -1351,7 +1351,7 @@ the new loader and tag it with ``twig.loader``:
1351
1351
id=" acme.demo_bundle.loader.some_twig_loader"
1352
1352
class=" Acme\DemoBundle\Loader\SomeTwigLoader" >
1353
1353
1354
- <tag name=" twig.loader" />
1354
+ <tag name=" twig.loader" priority= " 0 " />
1355
1355
</service>
1356
1356
</services>
1357
1357
</container>
@@ -1360,9 +1360,14 @@ the new loader and tag it with ``twig.loader``:
1360
1360
1361
1361
$container
1362
1362
->register('acme.demo_bundle.loader.some_twig_loader', 'Acme\DemoBundle\Loader\SomeTwigLoader')
1363
- ->addTag('twig.loader')
1363
+ ->addTag('twig.loader', array('priority' => 0) )
1364
1364
;
1365
1365
1366
+ .. note::
1367
+
1368
+ The ``priority`` value is optional and defaults to ``0``.
1369
+ The higher priority loaders are tried first.
1370
+
1366
1371
validator.constraint_validator
1367
1372
------------------------------
1368
1373
You can’t perform that action at this time.
0 commit comments