You are here

public function KeyValueEntityStorage::hasData in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage::hasData()
  2. 9 core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php \Drupal\Core\Entity\KeyValueStore\KeyValueEntityStorage::hasData()

Determines if the storage contains any data.

Return value

bool TRUE if the storage contains data, FALSE if not.

Overrides EntityStorageBase::hasData

File

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

Class

KeyValueEntityStorage
Provides a key value backend for entities.

Namespace

Drupal\Core\Entity\KeyValueStore

Code

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