官术网_书友最值得收藏!

Tagged services

Service definitions can also be tagged in order to inform the container if they serve a specific purpose. 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.

主站蜘蛛池模板: 平邑县| 沾益县| 丹寨县| 阜新| 伊吾县| 甘肃省| 武夷山市| 临城县| 扎囊县| 任丘市| 新巴尔虎左旗| 河曲县| 郁南县| 高碑店市| 阳山县| 盐山县| 永吉县| 安化县| 靖边县| 大化| 施甸县| 新晃| 阿合奇县| 清苑县| 剑河县| 泸定县| 山西省| 洞头县| 罗定市| 高密市| 金溪县| 双城市| 霍林郭勒市| 和林格尔县| 长宁区| 梅河口市| 沁水县| 兴和县| 略阳县| 汽车| 额济纳旗|