Uninstall hook in opencase module

Also moved more config files about.
This commit is contained in:
naomi 2018-07-05 14:05:50 +02:00
parent 8dd56d5b51
commit 73e7ff2656

View File

@ -130,3 +130,22 @@ function opencase_form_oc_case_type_edit_form_alter(&$form, $form_state) {
$widget->setup($form);
$widget->populate($form);
}
/**
* Implements hook_uninstall().
* Removes configs.
*/
function opencase_uninstall() {
$configs = [
'block.block.opencasecontextualmenu',
'block.block.opencase',
'system.menu.openc',
'views.view.cases',
'block.block.opencaseglobal',
'system.menu.opencase-admin',
'views.view.activities'
];
foreach($configs as $config) {
Drupal::configFactory()->getEditable($config)->delete();
}
}