function CourseObjectContent::optionsForm in Course 7.2
Same name and namespace in other branches
- 6 modules/course_content/course_content.classes.inc \CourseObjectContent::optionsForm()
- 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
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,
);
}
}