You are here

public function UpdateProcessor::createFetchTask in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/update/src/UpdateProcessor.php \Drupal\update\UpdateProcessor::createFetchTask()
  2. 9 core/modules/update/src/UpdateProcessor.php \Drupal\update\UpdateProcessor::createFetchTask()

File

core/modules/update/src/UpdateProcessor.php, line 115

Class

UpdateProcessor
Process project update information.

Namespace

Drupal\update

Code

public function createFetchTask($project) {
  if (empty($this->fetchTasks)) {
    $this->fetchTasks = $this->fetchTaskStore
      ->getAll();
  }
  if (empty($this->fetchTasks[$project['name']])) {
    $this->fetchQueue
      ->createItem($project);
    $this->fetchTaskStore
      ->set($project['name'], $project);
    $this->fetchTasks[$project['name']] = REQUEST_TIME;
  }
}