You are here

public function LearningPathAchievementController::buildTrainingProgressAccess in Opigno Learning path 3.x

Checks training progress access.

1 string reference to 'LearningPathAchievementController::buildTrainingProgressAccess'
opigno_learning_path.routing.yml in ./opigno_learning_path.routing.yml
opigno_learning_path.routing.yml

File

src/Controller/LearningPathAchievementController.php, line 1020

Class

LearningPathAchievementController
Class LearningPathAchievementController.

Namespace

Drupal\opigno_learning_path\Controller

Code

public function buildTrainingProgressAccess(AccountInterface $account) {

  /** @var \Drupal\opigno_social\Services\UserAccessManager $user_access_manager */
  $user_access_manager = \Drupal::service('opigno_social.user_access_manager');
  return AccessResult::allowedIf($user_access_manager
    ->canAccessUserStatistics($account));
}