function UpdateProcessor::createFetchTask

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

Overrides UpdateProcessorInterface::createFetchTask

File

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

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;
    }
}

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