function UpdateProcessor::createFetchTask

Same name in other branches
  1. 9 core/modules/update/src/UpdateProcessor.php \Drupal\update\UpdateProcessor::createFetchTask()
  2. 8.9.x core/modules/update/src/UpdateProcessor.php \Drupal\update\UpdateProcessor::createFetchTask()
  3. 11.x core/modules/update/src/UpdateProcessor.php \Drupal\update\UpdateProcessor::createFetchTask()

File

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

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']] = $this->time
            ->getRequestTime();
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.