What's the smallest syntax for tagged service (NEON)
Notice: This thread is very old.
- Tomáš Votruba
- Moderator | 1114
Tagging service in config.neon:
-
class: App\CatalogModule\Filters\LocaleFilter
tags: [zenify.doctrine.filter]
With this commit, we can drop 1 line:
- class: App\CatalogModule\Filters\LocaleFilter
tags: [zenify.doctrine.filter]
Is there anything shorter than this?
- jiri.pudil
- Nette Blogger | 1029
You can go with this one-liner, but it affects readability (and it's not much shorter actually):
- {class: App\CatalogModule\Filters\LocaleFilter, tags: [zenify.doctrine.filter]}
- Tomáš Votruba
- Moderator | 1114
@enumag Looks like that didn't get into dev nette (commit), did it?
TemplateExtension source seems like temporary solution for me.
@matej21 I'd prefer native Nette solution. If that doesn't work, I'll check your library. Thanks