-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathworkbench.install
41 lines (37 loc) · 1.13 KB
/
workbench.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
<?php
/**
* @file
* Uninstall config.
*/
/**
* Implements hook_uninstall().
*/
function workbench_uninstall() {
\Drupal::configFactory()->getEditable('system.menu.workbench')->delete();
}
/**
* Add a menu for Workbench.
*/
function workbench_update_8001(&$sandbox) {
$config_factory = \Drupal::configFactory();
$config = $config_factory->getEditable('system.menu.workbench');
$config->set('id', 'workbench');
$config->set('label', 'Workbench');
$config->set('description', 'The editorial workbench.');
$config->set('langcode', 'en');
$config->set('locked', TRUE);
$config->save(TRUE);
}
/**
* Add the new settings for Workbench.
*/
function workbench_update_8002(&$sandbox) {
$config_factory = \Drupal::configFactory();
$config = $config_factory->getEditable('workbench.settings');
$config->set('overview_left', 'workbench_current_user:block_1');
$config->set('overview_right', 'workbench_edited:block_1');
$config->set('overview_main', 'workbench_recent_content:block_1');
$config->set('edits_main', 'workbench_edited:embed_1');
$config->set('all_main', 'workbench_recent_content:embed_1');
$config->save(TRUE);
}