You are here

public function SmsQueueProcessor::__construct in SMS Framework 2.x

Same name and namespace in other branches
  1. 8 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.

\Drupal\Component\Datetime\TimeInterface $time: Time.

File

src/Provider/SmsQueueProcessor.php, line 64

Class

SmsQueueProcessor
The SMS Queue Processor.

Namespace

Drupal\sms\Provider

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, QueueFactory $queue_factory, SmsProviderInterface $sms_provider, TimeInterface $time) {
  $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;
  $this->time = $time;
}