Constructs a new entity object, without permanently saving it.
Parameters
$values:
An array of values to set, keyed by property name. If the entity type has
bundles the bundle key has to be specified.
Return value
\Drupal\Core\Entity\EntityInterface
A new entity object.
File
- drupal/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php, line 100
- Contains \Drupal\Core\Entity\EntityStorageControllerInterface.
Class
- EntityStorageControllerInterface
- Defines a common interface for entity controller classes.
Namespace
Drupal\Core\Entity
Code
public function create(array $values);