You are here

function thunder_update_8115 in Thunder 8.2

Update to Drupal 8.4.

File

./thunder.install, line 726
Install, update and uninstall functions for the thunder installation profile.

Code

function thunder_update_8115() {

  /** @var \Drupal\update_helper\Updater $updater */
  $updater = \Drupal::service('update_helper.updater');
  $updateLogger = $updater
    ->logger();
  $successful = TRUE;
  if (!$updater
    ->executeUpdate('thunder', 'thunder__thunder_update_8115')) {
    $successful = FALSE;
  }
  if (\Drupal::moduleHandler()
    ->moduleExists('thunder_riddle')) {
    if (!$updater
      ->executeUpdate('thunder_riddle', 'thunder__thunder_update_8115')) {
      $successful = FALSE;
    }
  }

  // TODO: ^^ Check logic of this update!?
  _thunder_mark_update_checklist('thunder__thunder_update_8115', $successful, $updateLogger);

  // Output logged messages to related channel of update execution.
  return $updateLogger
    ->output();
}