You are here

public function CourseObjectCertificate::getTakeType 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::getTakeType()
  2. 8.2 modules/course_certificate/src/Plugin/course/CourseObject/CourseObjectCertificate.php \Drupal\course_certificate\Plugin\course\CourseObject\CourseObjectCertificate::getTakeType()

How should this course object be executed?

  • iframe: display an iframe with getTakeUrl() in it
  • popup: launch getTakeUrl() in a popup
  • modal: launch getTakeUrl() in a modal
  • content: print the value from take() (or do whatever the module wants to do)

Overrides CourseObject::getTakeType

File

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

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 getTakeType() {
  return 'content';
}