function KeyValueEntityStorage::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage::__construct()
- 10 core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage::__construct()
- 9 core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage::__construct()
- 8.9.x core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage::__construct()
Constructs a new KeyValueEntityStorage.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.
\Drupal\Core\KeyValueStore\KeyValueStoreInterface $keyValueStore: The key value store.
\Drupal\Component\Uuid\UuidInterface $uuid_service: The UUID service.
\Drupal\Core\Language\LanguageManagerInterface $languageManager: The language manager.
\Drupal\Core\Cache\MemoryCache\MemoryCacheInterface $memory_cache: The memory cache.
Overrides EntityStorageBase::__construct
File
-
core/
lib/ Drupal/ Core/ Entity/ KeyValueStore/ KeyValueEntityStorage.php, line 53
Class
- KeyValueEntityStorage
- Provides a key value backend for entities.
Namespace
Drupal\Core\Entity\KeyValueStoreCode
public function __construct(EntityTypeInterface $entity_type, protected KeyValueStoreInterface $keyValueStore, UuidInterface $uuid_service, protected LanguageManagerInterface $languageManager, MemoryCacheInterface $memory_cache) {
parent::__construct($entity_type, $memory_cache);
$this->uuidService = $uuid_service;
// Check if the entity type supports UUIDs.
$this->uuidKey = $this->entityType
->getKey('uuid');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.