-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdamo.install
73 lines (64 loc) · 1.8 KB
/
damo.install
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/**
* @file
* Install, update and uninstall functions for the damo install profile.
*
* @todo: https://www.drupal.org/docs/8/distributions/creating-distributions/how-to-write-a-drupal-8-installation-profile#s-install-file
*/
/**
* Install the damo_common module.
*/
function damo_update_8001() {
Drupal::service('module_installer')->install(['damo_common']);
}
/**
* Switch to the imagemagick toolkit.
*/
function damo_update_8002() {
Drupal::service('module_installer')->install(['imagemagick']);
$configFactory = Drupal::configFactory();
$config = $configFactory->getEditable('system.image');
$config->set('toolkit', 'imagemagick');
$config->save(TRUE);
$config = $configFactory->getEditable('imagemagick.settings');
$config->set('quality', 80);
$config->save(TRUE);
}
/**
* Remove deprecated modules.
*/
function damo_update_8003() {
/** @var \Drupal\Core\Extension\ModuleInstallerInterface $installer */
$installer = Drupal::service('module_installer');
$installer->uninstall([
'better_formats',
'jquery_ui_datepicker',
]);
}
/**
* Remove deprecated modules.
*/
function damo_update_8004() {
$configFactory = Drupal::configFactory();
$config = $configFactory->getEditable('system.mail');
$interface = $config->get('interface');
$interface['default'] = 'php_mail';
$config->set('interface', $interface);
$config->save(TRUE);
/** @var \Drupal\Core\Extension\ModuleInstallerInterface $installer */
$installer = Drupal::service('module_installer');
$installer->uninstall([
'maillog',
'exception_mailer',
]);
}
/**
* Remove deprecated modules.
*/
function damo_update_8005() {
/** @var \Drupal\Core\Extension\ModuleInstallerInterface $installer */
$installer = Drupal::service('module_installer');
$installer->uninstall([
'r4032login',
]);
}