You are here

public function SimplenewsCommands::__construct in Simplenews 3.x

Same name and namespace in other branches
  1. 8.2 src/Commands/SimplenewsCommands.php \Drupal\simplenews\Commands\SimplenewsCommands::__construct()

SimplenewsCommands constructor.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

\Drupal\simplenews\Spool\SpoolStorageInterface $spool_storage: The spool storage.

\Drupal\simplenews\Mail\MailerInterface $mailer: The mailer service.

File

src/Commands/SimplenewsCommands.php, line 55

Class

SimplenewsCommands
A Drush commandfile.

Namespace

Drupal\simplenews\Commands

Code

public function __construct(ConfigFactoryInterface $config_factory, SpoolStorageInterface $spool_storage, MailerInterface $mailer) {
  parent::__construct();
  $this->simplenewsConfig = $config_factory
    ->get('simplenews.settings');
  $this->spoolStorage = $spool_storage;
  $this->mailer = $mailer;
}