The code services: my_module.event_subscriber: # Your service class class: Drupal\my_module\Entity\EventSubscriber\MyModuleSubscriber # Add your services to load here in the array arguments: [‘@current_user’] tags: # For this example, I am making an event subscriber class – { name: event_subscriber }
Tag Archives: base
[Drupal] Service dependency injection in a plugin type class
The code