function Course::unEnroll in Course 8.2
Same name and namespace in other branches
- 8.3 src/Entity/Course.php \Drupal\course\Entity\Course::unEnroll()
- 3.x src/Entity/Course.php \Drupal\course\Entity\Course::unEnroll()
Remove a user from this course.
Parameters
AccountInterface $account:
File
- src/
Entity/ Course.php, line 415
Class
- Course
- Defines the Course entity class.
Namespace
Drupal\course\EntityCode
function unEnroll(AccountInterface $account) {
return $this
->getTracker($account)
->delete();
}