function opigno_learning_path_group_presave in Opigno Learning path 8
Same name and namespace in other branches
- 3.x opigno_learning_path.module \opigno_learning_path_group_presave()
Sets additional fields for group visibility.
Implements hook_ENTITY_TYPE_presave().
File
- ./
opigno_learning_path.module, line 1766 - Contains opigno_learning_path.module.
Code
function opigno_learning_path_group_presave(Group $group) {
$type = $group->type->entity
->id();
if ($type == 'learning_path') {
LearningPathAccess::setVisibilityFields($group);
}
}