Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. namespace Drupalmy_module;
  2.  
  3. use DrupalCoreDependencyInjectionContainerBuilder;
  4. use DrupalCoreDependencyInjectionServiceProviderBase;
  5.  
  6. // @note: You only need Reference, if you want to change service arguments.
  7. use SymfonyComponentDependencyInjectionReference;
  8.  
  9. /**
  10. * Modifies the mail provider service.
  11. */
  12. class MyModuleServiceProvider extends ServiceProviderBase {
  13.  
  14. /**
  15. * {@inheritdoc}
  16. */
  17. public function alter(ContainerBuilder $container) {
  18. $definition = $container->getDefinition('plugin.manager.mail');
  19. $definition->setClass('DrupalMY_MODULEMyMailProvider');
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement