You are here

function CourseObject::getCourse in Course 3.x

Same name and namespace in other branches
  1. 8.3 src/Entity/CourseObject.php \Drupal\course\Entity\CourseObject::getCourse()
  2. 8.2 src/Entity/CourseObject.php \Drupal\course\Entity\CourseObject::getCourse()

Get the Course that contains this CourseObject.

Return value

Course

1 call to CourseObject::getCourse()
CourseObject::optionsSubmit in src/Entity/CourseObject.php
Save object configs to cache.

File

src/Entity/CourseObject.php, line 732

Class

CourseObject
Parent abstract base class of all course objects.

Namespace

Drupal\course\Entity

Code

function getCourse() {
  return Course::load($this
    ->get('cid')
    ->getString());
}