Archived video

This video is archived and won't be updated. We're keeping it online for now as a courtesy.

Alternate resources: 

Fun with Tagging Services in Symfony 3

Video loading...

Transcript language code: 

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:08
    We need to somehow tell Twig about our fun and new Twig extension.
  • 0:12
    To do that, first, register it as a service.
  • 0:16
    The name doesn't matter, so how about app.markdown_extension.
  • 0:23
    Set the class, but skip arguments.
  • 0:27
    We don't have any yet, so this is optional.
  • 0:30
    Now, this service is a bit different.
  • 0:33
    It's not something that we intend to use directly in our controller,
  • 0:36
    like app.markdown_transformer.
  • 0:40
    Instead, we simply want Twig to know about our service.
  • 0:45
    We somehow need to raise our hand and say, "Oh, oh, oh, oh, hey!

Fun with Tagging Services in Symfony 3


In this lesson, we'll add tags to our services YAML file so that Twig knows about our new Twig extension. We'll discuss the reason behind tags and refactor our service with our new understanding of dependency injection tags!

Log in or sign up to download companion files.

Additional resources:
There are no resources for this video. If you believe there should be, please contact us.