function opigno_module_update_8019 in Opigno module 8
Add views 'groups list', 'modules list' and 'activities list'.
File
- ./
opigno_module.install, line 1190 - Opigno module app install/update functionality.
Code
function opigno_module_update_8019() {
// Add configs for admin views.
$config_path = drupal_get_path('module', 'opigno_module') . '/config/optional';
/* @var Drupal\Core\Config\CachedStorage $config_storage */
$storage = new FileStorage($config_path);
$config_storage = \Drupal::service('config.storage');
$data = $storage
->read('views.view.activity_list');
$config_storage
->write('views.view.activity_list', $data);
$data = $storage
->read('views.view.groups_list');
$config_storage
->write('views.view.groups_list', $data);
$data = $storage
->read('views.view.module_list');
$config_storage
->write('views.view.module_list', $data);
}