function EntityStorageBase::doCreate
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::doCreate()
- 10 core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::doCreate()
- 11.x core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::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
1 call to EntityStorageBase::doCreate()
- EntityStorageBase::create in core/
lib/ Drupal/ Core/ Entity/ EntityStorageBase.php - Constructs a new entity object, without permanently saving it.
3 methods override EntityStorageBase::doCreate()
- ConfigEntityStorage::doCreate in core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityStorage.php - Performs storage-specific creation of entities.
- ContentEntityStorageBase::doCreate in core/
lib/ Drupal/ Core/ Entity/ ContentEntityStorageBase.php - Performs storage-specific creation of entities.
- KeyValueEntityStorage::doCreate in core/
lib/ Drupal/ Core/ Entity/ KeyValueStore/ KeyValueEntityStorage.php - Performs storage-specific creation of entities.
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityStorageBase.php, line 241
Class
- EntityStorageBase
- A base entity storage class.
Namespace
Drupal\Core\EntityCode
protected function doCreate(array $values) {
return new $this->entityClass($values, $this->entityTypeId);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.