You are here

function CourseObjectContent::optionsForm in Course 7

Same name and namespace in other branches
  1. 6 modules/course_content/course_content.classes.inc \CourseObjectContent::optionsForm()
  2. 7.2 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']['node_type']['#options'][$this
      ->getComponent()];
    $form['node']['node_type']['#options'] = array(
      $this
        ->getComponent() => $desc,
    );
  }
}