W3cubDocs

/Drupal 8

function update_create_fetch_task

update_create_fetch_task($project)

Adds a task to the queue for fetching release history data for a project.

We only create a new fetch task if there's no task already in the queue for this particular project (based on 'update_fetch_task' key-value collection).

Parameters

$project: Associative array of information about a project as created by \Drupal\Update\UpdateManager::getProjects(), including keys such as 'name' (short name), and the 'info' array with data from a .info.yml file for the project.

See also

\Drupal\update\UpdateFetcher::createFetchTask()

File

core/modules/update/update.module, line 379
Handles updates of Drupal core and contributed projects.

Code

function update_create_fetch_task($project) {
  \Drupal::service('update.processor')->createFetchTask($project);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!update!update.module/function/update_create_fetch_task/8.1.x