function openlayers_test_uninstall in Openlayers 7.2
Same name and namespace in other branches
- 6.2 tests/openlayers_test.install \openlayers_test_uninstall()
Implementation of hook_uninstall().
File
- tests/
openlayers_test.install, line 61 - This file holds the functions for the installing and enabling of the openlayers_test module.
Code
function openlayers_test_uninstall() {
// Remove any added data (check for function)
if (function_exists('node_type_delete')) {
node_type_delete('openlayers_test_type');
}
// Get module variables
$variables = db_query("SELECT v.name FROM {variable} AS v WHERE v.name LIKE ':pattern'", array(
':pattern' => db_like('openlayers_test_') . '%',
))
->fetchAll();
// Remove variables
foreach ($variables as $v) {
variable_del($v);
}
}