class UserEmailVerificationReminders in User email verification 8
Remind users which wasn't verified by cron.
Plugin annotation
@QueueWorker(
id = "user_email_verification_reminders",
title = @Translation("User email verification: Remind users"),
cron = {"time" = 30}
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Queue\QueueWorkerBase implements QueueWorkerInterface
- class \Drupal\user_email_verification\Plugin\QueueWorker\UserEmailVerificationReminders implements ContainerFactoryPluginInterface
- class \Drupal\Core\Queue\QueueWorkerBase implements QueueWorkerInterface
Expanded class hierarchy of UserEmailVerificationReminders
File
- src/
Plugin/ QueueWorker/ UserEmailVerificationReminders.php, line 19
Namespace
Drupal\user_email_verification\Plugin\QueueWorkerView source
class UserEmailVerificationReminders extends QueueWorkerBase implements ContainerFactoryPluginInterface {
/**
* User email verification helper service.
*
* @var \Drupal\user_email_verification\UserEmailVerificationInterface
*/
protected $userEmailVerification;
/**
* Constructs a new object.
*
* @param array $configuration
* A configuration array containing information about the plugin instance.
* @param string $plugin_id
* The plugin_id for the plugin instance.
* @param mixed $plugin_definition
* The plugin implementation definition.
* @param \Drupal\user_email_verification\UserEmailVerificationInterface $user_email_verification_service
* User email verification helper service.
*/
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;
}
/**
* {@inheritdoc}
*/
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'));
}
/**
* {@inheritdoc}
*/
public function processItem($data) {
foreach ($data as $uid) {
$this->userEmailVerification
->remindUserById($uid);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
UserEmailVerificationReminders:: |
protected | property | User email verification helper service. | |
UserEmailVerificationReminders:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
|
UserEmailVerificationReminders:: |
public | function |
Works on a single queue item. Overrides QueueWorkerInterface:: |
|
UserEmailVerificationReminders:: |
public | function |
Constructs a new object. Overrides PluginBase:: |