function lazy_update_8308 in Lazy-load 8.3
Migrate "disabled paths" into new "visibility" setting.
File
- ./
lazy.install, line 251 - Install, update, and uninstall functions for the Lazy-load module.
Code
function lazy_update_8308() {
$config = \Drupal::configFactory()
->getEditable('lazy.settings');
$disabled_paths = $config
->get('disabled_paths');
$config
->set('disable_admin', TRUE)
->set('visibility', [
'id' => 'request_path',
'pages' => $disabled_paths,
'negate' => 0,
])
->clear('disabled_paths')
->save(TRUE);
}