Skip to content

Commit c03b5e3

Browse files
committed
Removed lots of redundant contents
1 parent 2b93b7d commit c03b5e3

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

service_container/tags.rst

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
How to Work with Service Tags
66
=============================
77

8-
Some container services require to be registered or used in some special way.
9-
Consider for example the :doc:`Twig extensions </templating/twig_extension>`:
10-
they are PHP classes that must be added to the main Twig object before using
11-
them. If you define those exensions as regular Symfony services, Twig will
12-
ignore them and an exception will be thrown when using them in templates.
13-
148
**Service tags** are a way to tell Symfony or other third-party bundles that
159
your service should be registered in some special way. Take the following
1610
example:
@@ -57,14 +51,12 @@ example:
5751
->addTag('twig.extension');
5852
5953
Services tagged with the ``twig.extension`` tag are collected during the
60-
initialization of TwigBundle to enable them as Twig extensions. In this example,
61-
that's why Symfony knows that the ``app.twig_extension`` service should be
62-
registered as a Twig extension.
63-
64-
For a list of all the tags available in the core Symfony Framework, check
65-
out :doc:`/reference/dic_tags`. Each of these has a different effect on your
66-
service and many tags require additional arguments (beyond just the ``name``
67-
parameter).
54+
initialization of TwigBundle and added to Twig as extensions.
55+
56+
Other tags are used to integrate your services into other systems. For a list of
57+
all the tags available in the core Symfony Framework, check out
58+
:doc:`/reference/dic_tags`. Each of these has a different effect on your service
59+
and many tags require additional arguments (beyond just the ``name`` parameter).
6860

6961
Creating custom Tags
7062
--------------------

0 commit comments

Comments
 (0)