@@ -1136,42 +1136,6 @@ For information on how to create the actual Twig Extension class, see
1136
1136
`Twig's documentation `_ on the topic or read the
1137
1137
:doc: `/templating/twig_extension ` article.
1138
1138
1139
- Before writing your own extensions, have a look at the
1140
- `Twig official extension repository `_ which already includes several
1141
- useful extensions. For example ``Intl `` and its ``localizeddate `` filter
1142
- that formats a date according to user's locale. These official Twig extensions
1143
- also have to be added as regular services:
1144
-
1145
- .. configuration-block ::
1146
-
1147
- .. code-block :: yaml
1148
-
1149
- services :
1150
- Twig\Extensions\IntlExtension :
1151
- tags : [twig.extension]
1152
-
1153
- .. code-block :: xml
1154
-
1155
- <?xml version =" 1.0" encoding =" UTF-8" ?>
1156
- <container xmlns =" http://symfony.com/schema/dic/services"
1157
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
1158
- xsi : schemaLocation =" http://symfony.com/schema/dic/services
1159
- https://symfony.com/schema/dic/services/services-1.0.xsd" >
1160
-
1161
- <services >
1162
- <service id =" Twig\Extensions\IntlExtension" >
1163
- <tag name =" twig.extension" />
1164
- </service >
1165
- </services >
1166
- </container >
1167
-
1168
- .. code-block :: php
1169
-
1170
- $container
1171
- ->register('Twig\Extensions\IntlExtension')
1172
- ->addTag('twig.extension')
1173
- ;
1174
-
1175
1139
twig.loader
1176
1140
-----------
1177
1141
@@ -1296,6 +1260,5 @@ For an example, see the ``DoctrineInitializer`` class inside the Doctrine
1296
1260
Bridge.
1297
1261
1298
1262
.. _`Twig's documentation` : https://twig.symfony.com/doc/2.x/advanced.html#creating-an-extension
1299
- .. _`Twig official extension repository` : https://github.com/fabpot/Twig-extensions
1300
1263
.. _`SwiftMailer's Plugin Documentation` : http://swiftmailer.org/docs/plugins.html
1301
1264
.. _`Twig Loader` : https://twig.symfony.com/doc/2.x/api.html#loaders
0 commit comments