SHARE
TWEET

Untitled

a guest Jun 19th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top