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

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.

主站蜘蛛池模板: 昂仁县| 德江县| 如东县| 通州市| 板桥市| 科技| 轮台县| 邻水| 东阳市| 池州市| 元江| 隆昌县| 宿州市| 肥东县| 双桥区| 濉溪县| 和硕县| 栾川县| 江西省| 海口市| 逊克县| 红原县| 尼玛县| 兴义市| 会宁县| 黄冈市| 神池县| 共和县| 天台县| 长垣县| 通辽市| 英德市| 始兴县| 班玛县| 武威市| 夏邑县| 曲水县| 石渠县| 科技| 迭部县| 怀安县|