Same filename in other branches
  1. 6.0.x advagg_mod/advagg_mod.install
  2. 7.x-2.x advagg_mod/advagg_mod.install
  3. 8.x-2.x advagg_mod/advagg_mod.install
  4. 8.x-3.x advagg_mod/advagg_mod.install
  5. 8.x-4.x advagg_mod/advagg_mod.install

Handles Advanced Aggregation mod submodule installation and upgrade tasks.

Fichier

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

Titre Deprecated Résumé
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.