You are here

function warmer_cdn_update_8101 in Warmer 8

Same name and namespace in other branches
  1. 2.x modules/warmer_cdn/warmer_cdn.install \warmer_cdn_update_8101()

Init the new verify option.

File

modules/warmer_cdn/warmer_cdn.install, line 11
Install, update and uninstall functions for the Warmer CDN module.

Code

function warmer_cdn_update_8101() {
  $warmer_config = \Drupal::configFactory()
    ->getEditable('warmer.settings');
  $warmers = $warmer_config
    ->get('warmers');
  if (isset($warmers['cdn'])) {
    $warmers['cdn']['verify'] = TRUE;
  }
  if (isset($warmers['sitemap'])) {
    $warmers['sitemap']['verify'] = TRUE;
  }
  $warmer_config
    ->set('warmers', $warmers);
  $warmer_config
    ->save();
}