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

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.

主站蜘蛛池模板: 古交市| 武穴市| 大足县| 锡林浩特市| 山丹县| 门头沟区| 伊春市| 治多县| 潼关县| 福泉市| 波密县| 中宁县| 东城区| 静宁县| 定陶县| 丰都县| 珲春市| 怀远县| 涿州市| 柞水县| 抚州市| 丹巴县| 潞西市| 临泉县| 岳普湖县| 都昌县| 视频| 蒲城县| 福清市| 苗栗市| 德安县| 旺苍县| 崇礼县| 濉溪县| 平乐县| 崇州市| 镇康县| 佛冈县| 若羌县| 岢岚县| 敦化市|