Same filename and directory in other branches
  1. 5.0.x advagg_mod/advagg_mod.install 1 commentaire
  2. 7.x-2.x advagg_mod/advagg_mod.install 1 commentaire
  3. 8.x-2.x advagg_mod/advagg_mod.install 1 commentaire
  4. 8.x-3.x advagg_mod/advagg_mod.install 1 commentaire
  5. 8.x-4.x advagg_mod/advagg_mod.install 1 commentaire

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();
}

/**
 * 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();
}

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.
advagg_mod_update_8501 Add missing configuration parameter for unified_multisite_dir when undefined.