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

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.

主站蜘蛛池模板: 东台市| 丹寨县| 家居| 广灵县| 德兴市| 同仁县| 牙克石市| 锦州市| 红安县| 德令哈市| 霸州市| 浑源县| 营口市| 北票市| 昔阳县| 河间市| 临潭县| 安岳县| 永川市| 宁陕县| 津市市| 连江县| 梧州市| 凌源市| 蒲城县| 平山县| 乾安县| 凌源市| 林芝县| 乐清市| 高尔夫| 罗平县| 扬中市| 昆明市| 双鸭山市| 剑川县| 泊头市| 陇南市| 松江区| 封开县| 玛纳斯县|