You are here

function cookiebot_update_8002 in Cookiebot - Cookie consent, Cookie monitoring and Cookie control 8

Update configuration keys.

File

./cookiebot.install, line 23
Contains install, update and uninstall hooks.

Code

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