You are here

advagg_mod.install in Advanced CSS/JS Aggregation 8.4

Handles Advanced Aggregation mod submodule installation and upgrade tasks.

File

advagg_mod/advagg_mod.install
View source
<?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();
}

/**
 * Implements hook_install().
 *
 * Clear caches.
 */
function advagg_mod_install() {
  Cache::invalidateTags([
    'library_info',
  ]);
  \Drupal::cache('render')
    ->invalidateAll();
}

Functions

Namesort descending Description
advagg_mod_install Implements hook_install().
advagg_mod_update_8201 Implements hook_update_N().
advagg_mod_update_8301 Remove orphaned configuration option for google analytics.