You are here

public function SmsQueueProcessor::__construct in SMS Framework 8

Same name and namespace in other branches
  1. 2.x src/Provider/SmsQueueProcessor.php \Drupal\sms\Provider\SmsQueueProcessor::__construct()
  2. 2.1.x src/Provider/SmsQueueProcessor.php \Drupal\sms\Provider\SmsQueueProcessor::__construct()

Creates a new instance of SmsQueueProcessor.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Queue\QueueFactory $queue_factory: The queue service.

\Drupal\sms\Provider\SmsProviderInterface $sms_provider: The SMS provider.

File

src/Provider/SmsQueueProcessor.php, line 52

Class

SmsQueueProcessor
The SMS Queue Processor.

Namespace

Drupal\sms\Provider

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, QueueFactory $queue_factory, SmsProviderInterface $sms_provider) {
  $this->smsGatewayStorage = $entity_type_manager
    ->getStorage('sms_gateway');
  $this->smsMessageStorage = $entity_type_manager
    ->getStorage('sms');
  $this->queue = $queue_factory
    ->get('sms.messages', FALSE);
  $this->smsProvider = $sms_provider;
}