function CourseObjectWebform::optionsForm in Course 3.x
Same name and namespace in other branches
- 8.3 modules/course_webform/src/Plugin/course/CourseObject/CourseObjectWebform.php \Drupal\course_webform\Plugin\course\CourseObject\CourseObjectWebform::optionsForm()
- 8.2 modules/course_webform/src/Plugin/course/CourseObject/CourseObjectWebform.php \Drupal\course_webform\Plugin\course\CourseObject\CourseObjectWebform::optionsForm()
Default options form for all course objects.
Overrides CourseObject::optionsForm
File
- modules/
course_webform/ src/ Plugin/ course/ CourseObject/ CourseObjectWebform.php, line 144
Class
- CourseObjectWebform
- Plugin annotation @CourseObject( id = "webform", label = "Webform", handlers = { "fulfillment" = "\Drupal\course_webform\Plugin\course\CourseObject\CourseObjectWebformFulfillment" } )
Namespace
Drupal\course_webform\Plugin\course\CourseObjectCode
function optionsForm(&$form, FormStateInterface $form_state) {
parent::optionsForm($form, $form_state);
$form['instance'] = array(
'#type' => 'entity_autocomplete',
'#target_type' => 'webform',
'#default_value' => $this
->getOption('instance') ? Webform::load($this
->getOption('instance')) : NULL,
);
return $form;
}