You are here

public function CourseObjectManual::optionsForm in Course 8.3

Same name and namespace in other branches
  1. 8.2 modules/course_object_manual/src/Plugin/course/CourseObject/CourseObjectManual.php \Drupal\course_object_manual\Plugin\course\CourseObject\CourseObjectManual::optionsForm()
  2. 3.x modules/course_object_manual/src/Plugin/course/CourseObject/CourseObjectManual.php \Drupal\course_object_manual\Plugin\course\CourseObject\CourseObjectManual::optionsForm()

Default options form for all course objects.

Overrides CourseObject::optionsForm

File

modules/course_object_manual/src/Plugin/course/CourseObject/CourseObjectManual.php, line 57

Class

CourseObjectManual
Plugin annotation @CourseObject( id = "manual", label = "Manual step", handlers = { "fulfillment" = "\Drupal\course\Entity\CourseObjectFulfillment" } )

Namespace

Drupal\course_object_manual\Plugin\course\CourseObject

Code

public function optionsForm(&$form, &$form_state) {
  parent::optionsForm($form, $form_state);
  $config = $this
    ->getOptions();
  $form['complete_msg'] = array(
    '#type' => 'textfield',
    '#title' => t('Complete message'),
    '#default_value' => $config['complete_msg'],
  );
  $form['failed_msg'] = array(
    '#type' => 'textfield',
    '#title' => t('Failed message'),
    '#default_value' => $config['failed_msg'],
  );
  $form['incomplete_msg'] = array(
    '#type' => 'textfield',
    '#title' => t('Incomplete message'),
    '#default_value' => $config['incomplete_msg'],
  );
}