You are here

public function QueueWorkerManager::processDefinition in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Queue/QueueWorkerManager.php \Drupal\Core\Queue\QueueWorkerManager::processDefinition()

Performs extra processing on plugin definitions.

By default we add defaults for the type to the definition. If a type has additional processing logic they can do that by replacing or extending the method.

Overrides DefaultPluginManager::processDefinition

File

core/lib/Drupal/Core/Queue/QueueWorkerManager.php, line 45
Contains \Drupal\Core\Queue\QueueWorkerManager.

Class

QueueWorkerManager
Defines the queue worker manager.

Namespace

Drupal\Core\Queue

Code

public function processDefinition(&$definition, $plugin_id) {
  parent::processDefinition($definition, $plugin_id);

  // Assign a default time if a cron is specified.
  if (isset($definition['cron'])) {
    $definition['cron'] += [
      'time' => 15,
    ];
  }
}