You are here

fac.install in Fast Autocomplete 8

Same filename and directory in other branches
  1. 7 fac.install

This file contains the install/update/uninstall functions of the fac module.

File

fac.install
View source
<?php

/**
 * @file
 * This file contains the install/update/uninstall functions of the fac module.
 */
use Drupal\Core\StreamWrapper\PublicStream;

/**
 * Implements hook_uninstall().
 */
function fac_uninstall() {

  // Cleanup the json files.
  \Drupal::service('file_system')
    ->deleteRecursive(PublicStream::basePath() . '/fac-json');

  // Clean up the state.
  \Drupal::state()
    ->deleteMultiple([
    'fac_key',
    'fac_key_timestamp',
  ]);
}

/**
 * Set the new "use CDN" option to the default value of TRUE.
 */
function fac_update_8100() {
  $config_factory = \Drupal::configFactory();
  $config = $config_factory
    ->getEditable('fac.settings');
  $config
    ->set('highlighting_script_use_cdn', TRUE);
  $config
    ->save(TRUE);
}

Functions

Namesort descending Description
fac_uninstall Implements hook_uninstall().
fac_update_8100 Set the new "use CDN" option to the default value of TRUE.