From b71b007bd4da96c550d16792844a2f12ef280511 Mon Sep 17 00:00:00 2001 From: "Andrew (Andrius) Marcinkevicius" Date: Sat, 24 Jan 2015 08:29:14 +0200 Subject: [PATCH] Set twig service as private | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.3 | Fixed tickets | --- cookbook/templating/twig_extension.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cookbook/templating/twig_extension.rst b/cookbook/templating/twig_extension.rst index 993a9fa73d4..14dff858e5f 100644 --- a/cookbook/templating/twig_extension.rst +++ b/cookbook/templating/twig_extension.rst @@ -74,6 +74,7 @@ Now you must let the Service Container know about your newly created Twig Extens services: app.twig_extension: class: AppBundle\Twig\AcmeExtension + public: false tags: - { name: twig.extension } @@ -81,7 +82,10 @@ Now you must let the Service Container know about your newly created Twig Extens - + + @@ -93,6 +97,7 @@ Now you must let the Service Container know about your newly created Twig Extens $container ->register('app.twig_extension', '\AppBundle\Twig\AcmeExtension') + ->setPublic(false) ->addTag('twig.extension'); .. note::