You are here

function CourseObjectFulfillment::optionsDefinition in Course 7.2

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

Allow arbitrary data to be stored on the fulfillment, without explicitly defining optionsDefinition() in a custom class.

It is suggested that modules provide their own fulfillment classes and specify the valid extra options through their own optionsDefinition(). See CourseObjectWebformFulfillment for an example of this.

Overrides CourseHandler::optionsDefinition

3 methods override CourseObjectFulfillment::optionsDefinition()
CourseObjectQuizFulfillment::optionsDefinition in modules/course_quiz/CourseObjectQuizFulfillment.php
Define storage for quiz result IDs.
CourseObjectTestFulfillment::optionsDefinition in tests/course_test/course_test.classes.inc
Define storage for fulfillment values.
CourseObjectWebformFulfillment::optionsDefinition in modules/course_webform/CourseObjectWebformFulfillment.php
Define storage for submission IDs.

File

includes/CourseObjectFulfillment.inc, line 100

Class

CourseObjectFulfillment
Parent class for course object fulfillment.

Code

function optionsDefinition() {
  $options = get_object_vars($this);
  unset($options['entityInfo']);
  return $options;
}