fac.install in Fast Autocomplete 8
Same filename and directory in other branches
This file contains the install/update/uninstall functions of the fac module.
File
fac.installView 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
Name | Description |
---|---|
fac_uninstall | Implements hook_uninstall(). |
fac_update_8100 | Set the new "use CDN" option to the default value of TRUE. |