You are here

public function CourseObjectCommerce::createInstance in Course 3.x

Don't create new products.

Overrides CourseObject::createInstance

File

modules/course_commerce/src/Plugin/course/CourseObject/CourseObjectCommerce.php, line 94

Class

CourseObjectCommerce
Plugin annotation @CourseObject( id = "commerce", label = "Payment", )

Namespace

Drupal\course_commerce\Plugin\course\CourseObject

Code

public function createInstance($node = NULL) {
  if (!$this
    ->getInstanceId()) {
    $this
      ->setOption('instance', $this
      ->getCourse()
      ->id());
  }
}