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

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.

主站蜘蛛池模板: 海林市| 宝应县| 凤山市| 江西省| 民丰县| 黔西| 冷水江市| 乡宁县| 汉源县| 乌鲁木齐市| 油尖旺区| 中宁县| 肇源县| 建始县| 扶风县| 游戏| 玉环县| 禹州市| 平果县| 武隆县| 临洮县| 图木舒克市| 浦城县| 桐乡市| 西丰县| 石林| 封丘县| 全南县| 大丰市| 任丘市| 崇州市| 昌图县| 克拉玛依市| 会东县| 衢州市| 合川市| 敦化市| 台北县| 泸州市| 林甸县| 湘阴县|