public function CourseObjectController::create in Course 7
Same name and namespace in other branches
- 7.2 includes/CourseObjectController.inc \CourseObjectController::create()
Overrides EntityAPIController::create().
Overrides EntityAPIController::create
1 call to CourseObjectController::create()
- CourseObjectController::query in includes/
CourseObjectController.inc - Overrides EntityAPIController::query().
File
- includes/
CourseObjectController.inc, line 26
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 ($ret['class']) {
$class = $ret['class'];
}
else {
$class = 'CourseObjectBroken';
}
return new $class($values, $this->entityType);
}