You are here

public function CourseObject::optionsDefinition in Course 3.x

Same name and namespace in other branches
  1. 8.3 src/Entity/CourseObject.php \Drupal\course\Entity\CourseObject::optionsDefinition()
  2. 8.2 src/Entity/CourseObject.php \Drupal\course\Entity\CourseObject::optionsDefinition()

Define configuration elements and their defaults.

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

Overrides CourseHandler::optionsDefinition

8 calls to CourseObject::optionsDefinition()
CourseObject::save in src/Entity/CourseObject.php
Apply configuration from session and let objects create their instances before saving the course object.
CourseObjectAttendance::optionsDefinition in modules/course_attendance/src/Plugin/course/CourseObject/CourseObjectAttendance.php
Define configuration elements and their defaults.
CourseObjectCertificate::optionsDefinition in modules/course_certificate/src/Plugin/course/CourseObject/CourseObjectCertificate.php
Define configuration elements and their defaults.
CourseObjectManual::optionsDefinition in modules/course_object_manual/src/Plugin/course/CourseObject/CourseObjectManual.php
Define configuration elements and their defaults.
CourseObjectNode::optionsDefinition in modules/course_content/src/Course/Object/CourseObjectNode.php
Define configuration elements and their defaults.

... See full list

7 methods override CourseObject::optionsDefinition()
CourseObjectAttendance::optionsDefinition in modules/course_attendance/src/Plugin/course/CourseObject/CourseObjectAttendance.php
Define configuration elements and their defaults.
CourseObjectCertificate::optionsDefinition in modules/course_certificate/src/Plugin/course/CourseObject/CourseObjectCertificate.php
Define configuration elements and their defaults.
CourseObjectManual::optionsDefinition in modules/course_object_manual/src/Plugin/course/CourseObject/CourseObjectManual.php
Define configuration elements and their defaults.
CourseObjectNode::optionsDefinition in modules/course_content/src/Course/Object/CourseObjectNode.php
Define configuration elements and their defaults.
CourseObjectPoll::optionsDefinition in modules/course_poll/src/Plugin/course/CourseObject/CourseObjectPoll.php
Define configuration elements and their defaults.

... See full list

File

src/Entity/CourseObject.php, line 125

Class

CourseObject
Parent abstract base class of all course objects.

Namespace

Drupal\course\Entity

Code

public function optionsDefinition() {
  $defaults = parent::optionsDefinition();
  $defaults += array(
    'uniqid' => NULL,
    'cid' => NULL,
    'title' => NULL,
    'enabled' => 1,
    'hidden' => 0,
    'required' => 1,
    'skippable' => 0,
    'delete' => 0,
    'delete_instance' => 0,
    'grade_include' => 0,
    'instance' => NULL,
    'plugins' => array(),
    'duration' => NULL,
    'skippable' => 0,
  );
  return $defaults;
}