forked from a64f7bb4-7358-4778-9fbe-3b882c34cc1d/v1
52 lines
1.1 KiB
PHP
52 lines
1.1 KiB
PHP
<?php
|
|
|
|
/**
|
|
* @file
|
|
* Handles Advanced Aggregation mod submodule installation and upgrade tasks.
|
|
*/
|
|
|
|
use Drupal\Core\Cache\Cache;
|
|
|
|
/**
|
|
* Implements hook_update_N().
|
|
*
|
|
* Set the css_defer_admin setting value.
|
|
*/
|
|
function advagg_mod_update_8201() {
|
|
\Drupal::service('config.factory')
|
|
->getEditable('advagg_mod.settings')
|
|
->set('css_defer_admin', FALSE)
|
|
->save();
|
|
}
|
|
|
|
/**
|
|
* Remove orphaned configuration option for google analytics.
|
|
*/
|
|
function advagg_mod_update_8301() {
|
|
$config = \Drupal::configFactory()->getEditable('advagg_mod.settings');
|
|
$config->clear('ga_inline_to_file');
|
|
$config->save();
|
|
}
|
|
|
|
/**
|
|
* Add missing configuration parameter for unified_multisite_dir when undefined.
|
|
*/
|
|
function advagg_mod_update_8501() {
|
|
$config = \Drupal::configFactory()->getEditable('advagg_mod.settings');
|
|
if (!is_string($config->get('unified_multisite_dir'))) {
|
|
$config->set('unified_multisite_dir', '');
|
|
$config->save();
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Implements hook_install().
|
|
*
|
|
* Clear caches.
|
|
*/
|
|
function advagg_mod_install() {
|
|
Cache::invalidateTags(['library_info']);
|
|
\Drupal::cache('render')->invalidateAll();
|
|
|
|
}
|