function KeyValueEntityStorage::hasData

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

Overrides EntityStorageBase::hasData

File

core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php, line 202

Class

KeyValueEntityStorage
Provides a key value backend for entities.

Namespace

Drupal\Core\Entity\KeyValueStore

Code

public function hasData() {
    return (bool) $this->keyValueStore
        ->getAll();
}

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