function QueueWorker::__construct
Same name in other branches
- 10 core/lib/Drupal/Core/Queue/Attribute/QueueWorker.php \Drupal\Core\Queue\Attribute\QueueWorker::__construct()
Parameters
string $id: The plugin ID.
\Drupal\Core\StringTranslation\TranslatableMarkup|null $title: The human-readable title of the plugin.
array|null $cron: (optional) An associative array of settings for cron. The array has one key, time, which is set to the time Drupal cron should spend on calling this worker in seconds. The default is set in \Drupal\Core\Queue\QueueWorkerManager::processDefinition().
class-string|null $deriver: (optional) The deriver class.
Overrides Plugin::__construct
File
-
core/
lib/ Drupal/ Core/ Queue/ Attribute/ QueueWorker.php, line 53
Class
- QueueWorker
- Declare a worker class for processing a queue item.
Namespace
Drupal\Core\Queue\AttributeCode
public function __construct(string $id, ?TranslatableMarkup $title = NULL, ?array $cron = NULL, ?string $deriver = NULL) {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.