cookiebot.install in Cookiebot - Cookie consent, Cookie monitoring and Cookie control 8
Same filename and directory in other branches
Contains install, update and uninstall hooks.
File
cookiebot.installView source
<?php
/**
* @file
* Contains install, update and uninstall hooks.
*/
/**
* Update configuration keys.
*/
function cookiebot_update_8001() {
$config = \Drupal::configFactory()
->getEditable('cookiebot.settings');
$config
->set('cookiebot_show_declaration', $config
->get('cookiebot_allow_declaration'));
$config
->clear('cookiebot_allow_declaration');
$config
->set('cookiebot_show_declaration_node_id', $config
->get('cookiebot_declaration_path'));
$config
->clear('cookiebot_declaration_path');
$config
->save();
}
/**
* Update configuration keys.
*/
function cookiebot_update_8002() {
$config = \Drupal::configFactory()
->getEditable('cookiebot.settings');
$config
->set('cookiebot_show_declaration_node_path', $config
->get('cookiebot_show_declaration_node_id'));
$config
->clear('cookiebot_show_declaration_node_id');
$config
->save();
}
Functions
Name | Description |
---|---|
cookiebot_update_8001 | Update configuration keys. |
cookiebot_update_8002 | Update configuration keys. |