You are here

function CourseObjectContent::optionsForm in Course 6

Same name and namespace in other branches
  1. 7.2 modules/course_content/course_content.classes.inc \CourseObjectContent::optionsForm()
  2. 7 modules/course_content/course_content.classes.inc \CourseObjectContent::optionsForm()

Set the default content type to be created.

Overrides CourseObjectNode::optionsForm

File

modules/course_content/course_content.classes.inc, line 12

Class

CourseObjectContent

Code

function optionsForm(&$form, &$form_state) {
  parent::optionsForm($form, $form_state);
  if (!$this
    ->getInstanceId()) {
    $desc = $form['node_type']['#options'][$this
      ->getComponent()];
    $form['node_type']['#options'] = array(
      $this
        ->getComponent() => $desc,
    );
  }
}