You are here

function CourseObject::setInstanceId in Course 3.x

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

Set this object's instance ID.

Parameters

string $id The external ID of this course object.:

7 calls to CourseObject::setInstanceId()
CourseObject::save in src/Entity/CourseObject.php
Apply configuration from session and let objects create their instances before saving the course object.
CourseObjectNode::createInstance in modules/course_content/src/Course/Object/CourseObjectNode.php
Create a node and set it as this course object's node.
CourseObjectNode::preSave in modules/course_content/src/Course/Object/CourseObjectNode.php
Clone a node before saving.
CourseObjectNode::thaw in modules/course_content/src/Course/Object/CourseObjectNode.php
Thaw data frozen from an earlier export/clone.
CourseObjectPoll::createInstance in modules/course_poll/src/Plugin/course/CourseObject/CourseObjectPoll.php
Creates a course object.

... See full list

File

src/Entity/CourseObject.php, line 705

Class

CourseObject
Parent abstract base class of all course objects.

Namespace

Drupal\course\Entity

Code

function setInstanceId($id) {
  return $this
    ->setOption('instance', $id);
}