@@ -1084,42 +1084,6 @@ For information on how to create the actual Twig Extension class, see
10841084`Twig's documentation `_ on the topic or read the
10851085:doc: `/templating/twig_extension ` article.
10861086
1087- Before writing your own extensions, have a look at the
1088- `Twig official extension repository `_ which already includes several
1089- useful extensions. For example ``Intl `` and its ``localizeddate `` filter
1090- that formats a date according to user's locale. These official Twig extensions
1091- also have to be added as regular services:
1092-
1093- .. configuration-block ::
1094-
1095- .. code-block :: yaml
1096-
1097- services :
1098- Twig\Extensions\IntlExtension :
1099- tags : [twig.extension]
1100-
1101- .. code-block :: xml
1102-
1103- <?xml version =" 1.0" encoding =" UTF-8" ?>
1104- <container xmlns =" http://symfony.com/schema/dic/services"
1105- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
1106- xsi : schemaLocation =" http://symfony.com/schema/dic/services
1107- https://symfony.com/schema/dic/services/services-1.0.xsd" >
1108-
1109- <services >
1110- <service id =" Twig\Extensions\IntlExtension" >
1111- <tag name =" twig.extension" />
1112- </service >
1113- </services >
1114- </container >
1115-
1116- .. code-block :: php
1117-
1118- $container
1119- ->register('Twig\Extensions\IntlExtension')
1120- ->addTag('twig.extension')
1121- ;
1122-
11231087twig.loader
11241088-----------
11251089
@@ -1244,6 +1208,5 @@ For an example, see the ``DoctrineInitializer`` class inside the Doctrine
12441208Bridge.
12451209
12461210.. _`Twig's documentation` : https://twig.symfony.com/doc/2.x/advanced.html#creating-an-extension
1247- .. _`Twig official extension repository` : https://github.com/fabpot/Twig-extensions
12481211.. _`SwiftMailer's Plugin Documentation` : http://swiftmailer.org/docs/plugins.html
12491212.. _`Twig Loader` : https://twig.symfony.com/doc/2.x/api.html#loaders
0 commit comments