public function CourseObjectFulfillmentController::create in Course 7
Same name and namespace in other branches
- 7.2 includes/CourseObjectFulfillmentController.inc \CourseObjectFulfillmentController::create()
Overrides EntityAPIController::create().
Overrides EntityAPIController::create
1 call to CourseObjectFulfillmentController::create()
- CourseObjectFulfillmentController::query in includes/
CourseObjectFulfillmentController.inc - Overrides EntityAPIController::query().
File
- includes/
CourseObjectFulfillmentController.inc, line 62
Class
Code
public function create(array $values = array()) {
// Add is_new property if it is not set.
$values += array(
'is_new' => TRUE,
);
$available = course_get_handlers('object');
$ret = $available[$values['module']][$values['object_type']];
if (isset($ret['fulfillment class'])) {
$class = $ret['fulfillment class'];
}
else {
// Base class which minimally handles fulfillments.
$class = 'CourseObjectFulfillment';
}
return new $class($values, $this->entityType);
}