protected function KeyValueEntityStorage::has in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage::has()
- 9 core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage::has()
Determines if this entity already exists in storage.
Parameters
int|string $id: The original entity ID.
\Drupal\Core\Entity\EntityInterface $entity: The entity being saved.
Return value
bool TRUE if this entity exists in storage, FALSE otherwise.
Overrides EntityStorageBase::has
1 call to KeyValueEntityStorage::has()
- KeyValueEntityStorage::doSave in core/
lib/ Drupal/ Core/ Entity/ KeyValueStore/ KeyValueEntityStorage.php - Performs storage-specific saving of the entity.
File
- core/
lib/ Drupal/ Core/ Entity/ KeyValueStore/ KeyValueEntityStorage.php, line 191
Class
- KeyValueEntityStorage
- Provides a key value backend for entities.
Namespace
Drupal\Core\Entity\KeyValueStoreCode
protected function has($id, EntityInterface $entity) {
return $this->keyValueStore
->has($id);
}