@@ -1084,42 +1084,6 @@ For information on how to create the actual Twig Extension class, see
1084
1084
`Twig's documentation `_ on the topic or read the
1085
1085
:doc: `/templating/twig_extension ` article.
1086
1086
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
-
1123
1087
twig.loader
1124
1088
-----------
1125
1089
@@ -1244,6 +1208,5 @@ For an example, see the ``DoctrineInitializer`` class inside the Doctrine
1244
1208
Bridge.
1245
1209
1246
1210
.. _`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
1248
1211
.. _`SwiftMailer's Plugin Documentation` : http://swiftmailer.org/docs/plugins.html
1249
1212
.. _`Twig Loader` : https://twig.symfony.com/doc/2.x/api.html#loaders
0 commit comments