function KeyValueContentEntityStorage::createWithSampleValues
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueContentEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueContentEntityStorage::createWithSampleValues()
- 8.9.x core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueContentEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueContentEntityStorage::createWithSampleValues()
- 11.x 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.
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\KeyValueStoreCode
public function createWithSampleValues($bundle = FALSE, array $values = []) {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.