function CourseController::completionAccess in Course 8.3
Same name and namespace in other branches
- 8.2 src/Controller/CourseController.php \Drupal\course\Controller\CourseController::completionAccess()
- 3.x src/Controller/CourseController.php \Drupal\course\Controller\CourseController::completionAccess()
Access callback for completion page.
1 string reference to 'CourseController::completionAccess'
File
- src/
Controller/ CourseController.php, line 18
Class
Namespace
Drupal\course\ControllerCode
function completionAccess(Course $course) {
$account = \Drupal::currentUser();
return Drupal\Core\Access\AccessResult::allowedIf($course
->isEnrolled($account));
}