function update_fetch_data_finished
Same name and namespace in other branches
- 11.x core/modules/update/update.module \update_fetch_data_finished()
- 10 core/modules/update/update.module \update_fetch_data_finished()
- 9 core/modules/update/update.module \update_fetch_data_finished()
- 8.9.x core/modules/update/update.module \update_fetch_data_finished()
- 7.x modules/update/update.fetch.inc \update_fetch_data_finished()
Batch callback: Performs actions when all fetch tasks have been completed.
Parameters
bool $success: TRUE if the batch operation was successful; FALSE if there were errors.
array $results: An associative array of results from the batch operation, including the key 'updated' which holds the total number of projects we fetched available update data for.
Deprecated
in drupal:11.5.0 and is removed from drupal:13.0.0. There is no replacement.
See also
https://www.drupal.org/node/3592959
File
-
core/
modules/ update/ update.module, line 126
Code
function update_fetch_data_finished($success, $results) : void {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. There is no replacement. See https://www.drupal.org/node/3592959', E_USER_DEPRECATED);
if ($success) {
if (!empty($results)) {
if (!empty($results['updated'])) {
\Drupal::messenger()->addStatus(\Drupal::translation()->formatPlural($results['updated'], 'Checked available update data for one project.', 'Checked available update data for @count projects.'));
}
if (!empty($results['failures'])) {
\Drupal::messenger()->addError(\Drupal::translation()->formatPlural($results['failures'], 'Failed to get available update data for one project.', 'Failed to get available update data for @count projects.'));
}
}
}
else {
\Drupal::messenger()->addError(t('An error occurred trying to get available update data.'), 'error');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.