function CourseEnrollment::getCourse in Course 8.3
Same name and namespace in other branches
- 8.2 src/Entity/CourseEnrollment.php \Drupal\course\Entity\CourseEnrollment::getCourse()
- 3.x src/Entity/CourseEnrollment.php \Drupal\course\Entity\CourseEnrollment::getCourse()
Get the Course for this enrollment.
Return value
1 call to CourseEnrollment::getCourse()
- CourseEnrollment::preSave in src/
Entity/ CourseEnrollment.php - If a duration is set on the course, apply it to this enrollment.
File
- src/
Entity/ CourseEnrollment.php, line 188
Class
- CourseEnrollment
- Defines the profile entity class.
Namespace
Drupal\course\EntityCode
function getCourse() {
return Course::load($this
->get('cid')
->getString());
}