You are here

function opigno_learning_path_group_presave in Opigno Learning path 3.x

Same name and namespace in other branches
  1. 8 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 1675
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);
  }
}