You are here

function lazy_update_8201 in Lazy-load 8.2

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

Reset "disabled_paths" configuration to module default.

File

./lazy.install, line 44
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;
}