You are here

public function CourseObjectNode::__construct in Course 6

Same name and namespace in other branches
  1. 7.2 includes/CourseObjectNode.inc \CourseObjectNode::__construct()
  2. 7 includes/CourseObjectNode.inc \CourseObjectNode::__construct()

Construct a course object from a database record.

Use course_get_course_object to load an object when parameters are not already known.

Parameters

array $config: An object with object_type, module, and instance

object $account: (optional) A user account object.

Course $course: (optional) An instantiated Course object.

Overrides CourseObject::__construct

File

includes/course_object.core.inc, line 1070

Class

CourseObjectNode
A course object that uses a node as a base.

Code

public function __construct($object, $user = NULL, $course = NULL) {

  // Pass configuration to parent.
  parent::__construct($object, $user, $course);
  $this->node = node_load($this
    ->getInstanceId());
}