You are here

function minifyhtml_update_8002 in Minify Source HTML 8

Copy the configuration values to the new config.

File

./minifyhtml.install, line 20
Install and update hooks for the Minify HTML module.

Code

function minifyhtml_update_8002() {
  \Drupal::service('config.factory')
    ->getEditable('minifyhtml.config')
    ->set('minify', (bool) \Drupal::config('system.performance')
    ->get('minifyhtml.minify_html'))
    ->save();
  \Drupal::service('config.factory')
    ->getEditable('system.performance')
    ->clear('minifyhtml')
    ->save();
}