course_content.classes.inc in Course 6
File
modules/course_content/course_content.classes.inc
View source
<?php
class CourseObjectContent extends CourseObjectNode {
function getNodeTypes() {
$handlers = course_content_course_handlers();
return array_keys($handlers['object']);
}
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,
);
}
}
function optionsDefinition() {
$options = parent::optionsDefinition();
$options['node_type'] = $this->config['object_type'];
return $options;
}
}