You are here

class MailsystemServiceProvider in Mail System 8.4

Defines the Mailsystem service provider.

Hierarchy

Expanded class hierarchy of MailsystemServiceProvider

File

src/MailsystemServiceProvider.php, line 13

Namespace

Drupal\mailsystem
View source
class MailsystemServiceProvider implements ServiceProviderInterface, ServiceModifierInterface {

  /**
   * {@inheritdoc}
   */
  public function register(ContainerBuilder $container) {
  }

  /**
   * {@inheritdoc}
   */
  public function alter(ContainerBuilder $container) {

    // Overrides mail-factory class to use our own mail manager.
    $container
      ->getDefinition('plugin.manager.mail')
      ->setClass('Drupal\\mailsystem\\MailsystemManager')
      ->addMethodCall('setThemeManager', [
      new Reference('theme.manager'),
    ])
      ->addMethodCall('setThemeInitialization', [
      new Reference('theme.initialization'),
    ]);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MailsystemServiceProvider::alter public function Modifies existing service definitions. Overrides ServiceModifierInterface::alter
MailsystemServiceProvider::register public function Registers services to the container. Overrides ServiceProviderInterface::register