public function CourseObjectAttendance::optionsDefinition in Course 3.x
Define configuration elements and their defaults.
Extended classes should call parent::optionsDefinition first to get the parent's configuration.
Overrides CourseObject::optionsDefinition
File
- modules/
course_attendance/ src/ Plugin/ course/ CourseObject/ CourseObjectAttendance.php, line 20
Class
- CourseObjectAttendance
- Plugin annotation @CourseObject( id = "attendance", label = "Attendance", )
Namespace
Drupal\course_attendance\Plugin\course\CourseObjectCode
public function optionsDefinition() {
$config = \Drupal::config('course_attendance.settings');
$defaults = parent::optionsDefinition();
$defaults['open'] = $config
->get('open');
$defaults['close'] = $config
->get('closed');
return $defaults;
}