Skip to main content
Home
Drupal life hacks

Main navigation

  • Drupal
  • React
  • WP
  • Contact
  • About
User account menu
  • Log in

Breadcrumb

  1. Home

Tagged Services

By admin, 24 September, 2024

Practical Use Cases of Tagged Services in Drupal

In Drupal, "tagged services" allow you to categorize and manage service definitions by assigning them specific tags. These tags help the service container understand the purpose of certain services, often to group them for a specific function. Tagged services are typically used with "collector services," which gather services with the same tag and utilize them for a specific purpose.

How Tagged Services Work:

1. Defining a Service with a Tag:
  When defining a service in a *.services.yml file, you can apply a tag like this:

Tags

  • #Drupal Planet
  • Tagged Services
Tagged Services
Powered by Drupal