You are here

public function SendGridMail::__construct in SendGrid Integration 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Mail/SendGridMail.php \Drupal\sendgrid_integration\Plugin\Mail\SendGridMail::__construct()

SendGridMailSystem constructor.

Parameters

array $configuration: The plugin configuration, i.e. an array with configuration values keyed by configuration option name. The special key 'context' may be used to initialize the defined contexts by setting it to an array of context values keyed by context names.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Config\ConfigFactoryInterface $configFactory: The configuration factory service.

\Drupal\Core\logger\LoggerChannelFactoryInterface $loggerChannelFactory: The logger channel factory service.

\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: The module handler service.

\Drupal\Core\Queue\QueueFactory $queueFactory: The queue factory service.

File

src/Plugin/Mail/SendGridMail.php, line 86
Implements Drupal MailSystemInterface.

Class

SendGridMail
@file Implements Drupal MailSystemInterface.

Namespace

Drupal\sendgrid_integration\Plugin\Mail

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $configFactory, LoggerChannelFactoryInterface $loggerChannelFactory, ModuleHandlerInterface $moduleHandler, QueueFactory $queueFactory) {
  $this->configFactory = $configFactory;
  $this->logger = $loggerChannelFactory
    ->get('sendgrid_integration');
  $this->moduleHandler = $moduleHandler;
  $this->queueFactory = $queueFactory;
}