You are here

protected function CourseObjectFulfillmentStorage::doCreate in Course 8.3

Same name and namespace in other branches
  1. 8.2 src/Storage/CourseObjectFulfillmentStorage.php \Drupal\course\Storage\CourseObjectFulfillmentStorage::doCreate()
  2. 3.x src/Storage/CourseObjectFulfillmentStorage.php \Drupal\course\Storage\CourseObjectFulfillmentStorage::doCreate()

Performs storage-specific creation of entities.

Parameters

array $values: An array of values to set, keyed by property name.

Return value

\Drupal\Core\Entity\EntityInterface

Overrides ContentEntityStorageBase::doCreate

File

src/Storage/CourseObjectFulfillmentStorage.php, line 11

Class

CourseObjectFulfillmentStorage

Namespace

Drupal\course\Storage

Code

protected function doCreate(array $values) {
  $available = course_get_handlers('object');
  $ret = $available[$values['object_type']];
  $this->entityClass = $ret['handlers']['fulfillment'] ?? 'Drupal\\course\\Entity\\CourseObjectFulfillment';
  return parent::doCreate($values);
}