You are here

function lazy_update_8201 in Lazy-load 8.3

Same name and namespace in other branches
  1. 8.2 lazy.install \lazy_update_8201()

Reset "disabled_paths" configuration to module default.

File

./lazy.install, line 65
Install, update, and uninstall functions for the Lazy-load module.

Code

function lazy_update_8201() {
  $config = \Drupal::service('config.factory')
    ->getEditable('lazy.settings');
  if ($config
    ->get('disabled_paths') === NULL) {
    $config
      ->set('disabled_paths', '/rss.xml');
    return t('The new "disabled_paths" configuration is set to "/rss.xml" (default value).');
  }
  return NULL;
}