protected function CourseObjectStorage::doCreate in Course 8.3
Same name and namespace in other branches
- 8.2 src/Storage/CourseObjectStorage.php \Drupal\course\Storage\CourseObjectStorage::doCreate()
- 3.x src/Storage/CourseObjectStorage.php \Drupal\course\Storage\CourseObjectStorage::doCreate()
When creating a new entity, map any object to its respective class.
Overrides ContentEntityStorageBase::doCreate
File
- src/
Storage/ CourseObjectStorage.php, line 15
Class
Namespace
Drupal\course\StorageCode
protected function doCreate(array $values) {
$available = course_get_handlers();
$ret = $available[$values['object_type']];
if ($ret['class']) {
$this->entityClass = $ret['class'];
}
else {
$this->entityClass = 'Drupal\\course\\Course\\Object\\CourseObjectBroken';
}
return parent::doCreate($values);
}