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::