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

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.

主站蜘蛛池模板: 海兴县| 来宾市| 娄烦县| 桂林市| 察雅县| 龙陵县| 新竹县| 科技| 莲花县| 日土县| 绥江县| 怀宁县| 哈尔滨市| 瑞丽市| 临朐县| 日喀则市| 江陵县| 达孜县| 工布江达县| 安化县| 金沙县| 景东| 呼和浩特市| 阳江市| 蓝山县| 武陟县| 茶陵县| 桐庐县| 云和县| 盖州市| 饶河县| 龙山县| 肇东市| 安龙县| 响水县| 仁寿县| 兰溪市| 灵山县| 遂平县| 独山县| 黎平县|