if ($this->uuidKey &&
$this->uuidService && !
isset($values[$this->uuidKey
])) { $values[$this->uuidKey
] =
$this->uuidService->
generate();
} $entity =
$this->
doCreate($values);
$entity->
enforceIsNew();
$entity->
postCreate($this);
// Modules might need to add or change the data initially held by the new
// entity object, for instance to fill-in default values.
$this->
invokeHook('create',
$entity);
return $entity;
} /**
* Performs storage-specific creation of entities.
*
* @param array $values
* An array of values to set, keyed by property name.
*
* @return \Drupal\Core\Entity\EntityInterface
*/