You are here

public function ConfigEntityStorage::hasData in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php \Drupal\Core\Config\Entity\ConfigEntityStorage::hasData()
  2. 9 core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php \Drupal\Core\Config\Entity\ConfigEntityStorage::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/Config/Entity/ConfigEntityStorage.php, line 316

Class

ConfigEntityStorage
Defines the storage class for configuration entities.

Namespace

Drupal\Core\Config\Entity

Code

public function hasData() {
  return (bool) $this->configFactory
    ->listAll($this
    ->getPrefix());
}