Constructs a new entity object, without permanently saving it.
$entity_type: The type of the entity.
$values: An array of values to set, keyed by property name. If the entity type has bundles the bundle key has to be specified.
Drupal\Core\Entity\EntityInterface A new entity object.
function entity_create($entity_type, array $values) {
return entity_get_controller($entity_type)
->create($values);
}