-
Notifications
You must be signed in to change notification settings - Fork 0
/
asu_events.install.ignore
47 lines (42 loc) · 1.32 KB
/
asu_events.install.ignore
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* Implements hook_update_N();
* Revert all the module config.
*/
function asu_events_update_9001(&$sandbox) {
// Get this module name.
$module = \Drupal::service('module_handler')
->getModule(basename(__FILE__, '.install'))
->getName();
// Unlock the configuration storage.
\Drupal::state()->set('configuration_locked', FALSE);
// Revert all configs from this module.
\Drupal::service('webspark.config_manager')->revertAll($module);
// Lock the configuration storage.
\Drupal::state()->set('configuration_locked', TRUE);
}
/**
* Implements hook_update_N();
* Revert all the module config.
*/
function asu_events_update_9002(&$sandbox) {
_asu_events_revert_all_module_config();
}
/**
* Implements hook_update_N();
* Revert all the module config.
*/
function asu_events_update_9003(&$sandbox) {
_asu_events_revert_all_module_config();
}
function _asu_events_revert_all_module_config() {
$module = \Drupal::service('module_handler')
->getModule(basename(__FILE__, '.install'))
->getName();
// Unlock the configuration storage.
\Drupal::state()->set('configuration_locked', FALSE);
// Revert all configs from this module.
\Drupal::service('webspark.config_manager')->revertAll($module);
// Lock the configuration storage.
\Drupal::state()->set('configuration_locked', TRUE);
}