UserEmailVerificationReminders.php in User email verification 8
File
src/Plugin/QueueWorker/UserEmailVerificationReminders.php
View source
<?php
namespace Drupal\user_email_verification\Plugin\QueueWorker;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Queue\QueueWorkerBase;
use Drupal\user_email_verification\UserEmailVerificationInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
class UserEmailVerificationReminders extends QueueWorkerBase implements ContainerFactoryPluginInterface {
protected $userEmailVerification;
public function __construct(array $configuration, $plugin_id, $plugin_definition, UserEmailVerificationInterface $user_email_verification_service) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->userEmailVerification = $user_email_verification_service;
}
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('user_email_verification.service'));
}
public function processItem($data) {
foreach ($data as $uid) {
$this->userEmailVerification
->remindUserById($uid);
}
}
}