function _thunder_mark_update_checklist in Thunder 8.2
Same name and namespace in other branches
- 8.5 thunder.install \_thunder_mark_update_checklist()
- 8.3 thunder.install \_thunder_mark_update_checklist()
- 8.4 thunder.install \_thunder_mark_update_checklist()
- 6.2.x thunder.install \_thunder_mark_update_checklist()
- 6.0.x thunder.install \_thunder_mark_update_checklist()
- 6.1.x thunder.install \_thunder_mark_update_checklist()
Helper function for direct use of update helper checklist service.
Parameters
string $update_id: Identifier of update in checklist.
bool $successful: The success or failure of update.
\Drupal\update_helper\UpdateLogger $updateLogger: Used update logger service in update hook.
9 calls to _thunder_mark_update_checklist()
- thunder_update_8107 in ./
thunder.install - Installs the thunder_riddle module.
- thunder_update_8109 in ./
thunder.install - Change paragraphs add mode to use the modal.
- thunder_update_8115 in ./
thunder.install - Update to Drupal 8.4.
- thunder_update_8117 in ./
thunder.install - Enable paragraphs split text.
- thunder_update_8123 in ./
thunder.install - Remove the old paragraph split text solution.
File
- ./
thunder.install, line 89 - Install, update and uninstall functions for the thunder installation profile.
Code
function _thunder_mark_update_checklist($update_id, $successful, UpdateLogger $updateLogger) {
try {
/** @var \Drupal\update_helper_checklist\UpdateChecklist $update_checklist */
$update_checklist = \Drupal::service('update_helper_checklist.update_checklist');
if ($successful) {
$update_checklist
->markUpdatesSuccessful([
'thunder' => [
$update_id,
],
]);
}
else {
$update_checklist
->markUpdatesFailed([
'thunder' => [
$update_id,
],
]);
}
} catch (EntityStorageException $ee) {
$updateLogger
->warning(t('Unable to mark update in checklist.'));
} catch (ServiceNotFoundException $se) {
// If service is not available, we will just ignore it.
}
}