You are here

public function KeyValueContentEntityStorage::createWithSampleValues in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueContentEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueContentEntityStorage::createWithSampleValues()

Creates an entity with sample field values.

Parameters

string|bool $bundle: (optional) The entity bundle.

array $values: (optional) Any default values to use during generation.

Return value

\Drupal\Core\Entity\FieldableEntityInterface A fieldable content entity.

Throws

\Drupal\Core\Entity\EntityStorageException Thrown if the bundle does not exist or was needed but not specified.

Overrides ContentEntityStorageInterface::createWithSampleValues

File

core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueContentEntityStorage.php, line 40

Class

KeyValueContentEntityStorage
Provides a key value backend for content entities.

Namespace

Drupal\Core\Entity\KeyValueStore

Code

public function createWithSampleValues($bundle = FALSE, array $values = []) {
}