- 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.
推薦閱讀
- C#編程入門指南(上下冊)
- 三維圖形化C++趣味編程
- The React Workshop
- Internet of Things with Intel Galileo
- 大學計算機基礎(第2版)(微課版)
- 學Python也可以這么有趣
- HTML5從入門到精通(第4版)
- 利用Python進行數據分析
- Microsoft Azure Storage Essentials
- UNIX Linux程序設計教程
- Cocos2d-x Game Development Blueprints
- HTML5+CSS3+JavaScript 從入門到項目實踐(超值版)
- JavaScript悟道
- WCF技術剖析(卷1)
- Django 3 Web Development Cookbook