You are here

public function CourseObjectCertificate::optionsDefinition in Course 3.x

Same name and namespace in other branches
  1. 8.3 modules/course_certificate/src/Plugin/course/CourseObject/CourseObjectCertificate.php \Drupal\course_certificate\Plugin\course\CourseObject\CourseObjectCertificate::optionsDefinition()
  2. 8.2 modules/course_certificate/src/Plugin/course/CourseObject/CourseObjectCertificate.php \Drupal\course_certificate\Plugin\course\CourseObject\CourseObjectCertificate::optionsDefinition()

Define configuration elements and their defaults.

Extended classes should call parent::optionsDefinition first to get the parent's configuration.

Overrides CourseObject::optionsDefinition

File

modules/course_certificate/src/Plugin/course/CourseObject/CourseObjectCertificate.php, line 32

Class

CourseObjectCertificate
Plugin annotation @CourseObject( id = "certificate", label = "Certificate", handlers = { "fulfillment" = "\Drupal\course\Entity\CourseObjectFulfillment" } )

Namespace

Drupal\course_certificate\Plugin\course\CourseObject

Code

public function optionsDefinition() {
  $options = parent::optionsDefinition();
  $options['required'] = 0;
  $options['certificate_node'] = 1;
  return $options;
}