function KeyValueEntityStorage::has

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage::has()
  2. 10 core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage::has()
  3. 11.x core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage::has()

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\KeyValueStore

Code

protected function has($id, EntityInterface $entity) {
    return $this->keyValueStore
        ->has($id);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.