function CourseObjectContent::optionsDefinition in Course 8.3
Same name and namespace in other branches
- 8.2 modules/course_content/src/Plugin/course/CourseObject/CourseObjectContent.php \Drupal\course_content\Plugin\course\CourseObject\CourseObjectContent::optionsDefinition()
- 3.x modules/course_content/src/Plugin/course/CourseObject/CourseObjectContent.php \Drupal\course_content\Plugin\course\CourseObject\CourseObjectContent::optionsDefinition()
If course object is saved without configuration, make sure we have a default node type.
Overrides CourseObjectNode::optionsDefinition
File
- modules/
course_content/ src/ Plugin/ course/ CourseObject/ CourseObjectContent.php, line 34
Class
- CourseObjectContent
- Plugin annotation @CourseObject( id = "content", label = "Course content", handlers = { "fulfillment" = "\Drupal\course_content\Course\Object\CourseObjectNodeFulfillment" } )
Namespace
Drupal\course_content\Plugin\course\CourseObjectCode
function optionsDefinition() {
$options = parent::optionsDefinition();
$options['node_type'] = $this
->getNodeTypes()[0];
return $options;
}