- Drupal 8 Module Development
- Daniel Sipos
- 77字
- 2021-07-02 15:45:15
Tagged services
Service definitions can also be tagged in order to inform the container as to a specific purpose that they serve. Typically, these are picked up by a collector service that uses them for a given subsystem. As an example, if we wanted to tag the hello_world.salutation service, it would look something this:
hello_world.salutation:
class: Drupal\hello_world\HelloWorldSalutation
tags:
- {name: tag_name}
Tags can also get a priority, as we will see in some examples later in this book.
推薦閱讀
- Dependency Injection in .NET Core 2.0
- 跟老齊學Python:輕松入門
- SAP BusinessObjects Dashboards 4.1 Cookbook
- Visual C#.NET程序設計
- Swift語言實戰精講
- SQL Server從入門到精通(第3版)
- 從零開始學C語言
- Android玩家必備
- Visual Basic 6.0程序設計實驗教程
- Learning Ionic
- Android Development Tools for Eclipse
- 跟戴銘學iOS編程:理順核心知識點
- Drupal 8 Development:Beginner's Guide(Second Edition)
- Spring Data JPA從入門到精通
- Java程序設計入門(第2版)