function opigno_skills_system_install in Opigno module 8
Same name and namespace in other branches
- 3.x modules/opigno_skills_system/opigno_skills_system.install \opigno_skills_system_install()
Implements hook_install().
File
- modules/
opigno_skills_system/ opigno_skills_system.install, line 15 - Install, update and uninstall functions for the Opigno skills system module.
Code
function opigno_skills_system_install($is_syncing) {
if (!$is_syncing) {
// Give an access to manage skills vocabulary.
$role = Role::load('content_manager');
$issueAccessPermissions = [
'create terms in skills',
'delete terms in skills',
'edit terms in skills',
];
foreach ($issueAccessPermissions as $permission) {
$role
->grantPermission($permission);
}
$role
->save();
}
}