You are here

function CourseObject::setComponent in Course 3.x

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

Set the object component for this course object.

Parameters

string $component: The object's component.

Return value

CourseObject

File

src/Entity/CourseObject.php, line 763

Class

CourseObject
Parent abstract base class of all course objects.

Namespace

Drupal\course\Entity

Code

function setComponent($component) {
  return $this
    ->setOption('object_type', $component);
}