function opigno_moxtra_install in Opigno Moxtra 8
Same name and namespace in other branches
- 3.x opigno_moxtra.install \opigno_moxtra_install()
Creates the collaborative workspace field in a training groups.
File
- ./
opigno_moxtra.install, line 19 - Install, update and uninstall functions for the Opigno Moxtra module.
Code
function opigno_moxtra_install($is_syncing) {
if (!$is_syncing) {
$config_path = drupal_get_path('module', 'opigno_moxtra') . '/config/install';
$storage = new FileStorage($config_path);
$data = $storage
->read('field.storage.group.field_workspace');
if (!FieldStorageConfig::loadByName($data['entity_type'], $data['field_name'])) {
FieldStorageConfig::create($data)
->save();
}
$data = $storage
->read('field.field.group.learning_path.field_workspace');
if (!FieldConfig::loadByName($data['entity_type'], $data['bundle'], $data['field_name'])) {
FieldConfig::create($data)
->save();
}
_opigno_moxtra_set_meeting_permissions();
}
}