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

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.

主站蜘蛛池模板: 石城县| 漯河市| 南木林县| 射洪县| 错那县| 汕头市| 义马市| 正定县| 兰坪| 新乐市| 内乡县| 房产| 泸定县| 黑水县| 增城市| 洛川县| 青冈县| 饶河县| 南皮县| 荆门市| 勐海县| 太仆寺旗| 绥宁县| 龙陵县| 涿州市| 浦江县| 保靖县| 云阳县| 乌鲁木齐县| 祁东县| 桐梓县| 惠水县| 敖汉旗| 高阳县| 金川县| 奉化市| 苏尼特右旗| 衡水市| 泸定县| 霞浦县| 平山县|