You are here

public function CourseObjectNode::optionsDefinition in Course 6

Same name and namespace in other branches
  1. 7.2 includes/CourseObjectNode.inc \CourseObjectNode::optionsDefinition()
  2. 7 includes/CourseObjectNode.inc \CourseObjectNode::optionsDefinition()

Define configuration elements and their defaults.

Extended classes should call parent::optionsDefinition first to get the parent's configuration.

Overrides CourseObject::optionsDefinition

3 calls to CourseObjectNode::optionsDefinition()
CourseObjectBook::optionsDefinition in modules/course_book/course_book.classes.inc
Define configuration elements and their defaults.
CourseObjectContent::optionsDefinition in modules/course_content/course_content.classes.inc
If course object is saved without configuration, make sure we have a default node type.
CourseObjectQuiz::optionsDefinition in modules/course_quiz/course_quiz.classes.inc
Course quiz options.
3 methods override CourseObjectNode::optionsDefinition()
CourseObjectBook::optionsDefinition in modules/course_book/course_book.classes.inc
Define configuration elements and their defaults.
CourseObjectContent::optionsDefinition in modules/course_content/course_content.classes.inc
If course object is saved without configuration, make sure we have a default node type.
CourseObjectQuiz::optionsDefinition in modules/course_quiz/course_quiz.classes.inc
Course quiz options.

File

includes/course_object.core.inc, line 1137

Class

CourseObjectNode
A course object that uses a node as a base.

Code

public function optionsDefinition() {
  $defaults = parent::optionsDefinition();
  $defaults['private'] = 0;
  $options = array_intersect_key(node_get_types('names'), $this
    ->getNodeTypes());
  $defaults['node_type'] = key($options);
  return $defaults;
}