function optimizely_uninstall in Optimizely 8
Same name and namespace in other branches
- 8.3 optimizely.install \optimizely_uninstall()
- 8.0 optimizely.install \optimizely_uninstall()
- 7.3 optimizely.install \optimizely_uninstall()
- 7.2 optimizely.install \optimizely_uninstall()
Implements hook_uninstall().
Clean up / remove all data created by the module.
File
- ./
optimizely.install, line 156 - Install, update and uninstall functions for the Optimizely module.
Code
function optimizely_uninstall() {
// Remove all values from optimizely.settings.
$config = \Drupal::configFactory()
->getEditable('optimizely.settings');
$config
->delete();
drupal_set_message(t('Optimizely variables deleted.'), 'status');
// hook_uninstall removes schema automatically.
drupal_set_message(t('Optimizely database table dropped.'), 'status');
}