function EntityStorageBase::hasData
Determines if the storage contains any data.
Return value
bool TRUE if the storage contains data, FALSE if not.
Overrides EntityStorageInterface::hasData
3 methods override EntityStorageBase::hasData()
- ConfigEntityStorage::hasData in core/lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityStorage.php 
- Determines if the storage contains any data.
- ContentEntityNullStorage::hasData in core/lib/ Drupal/ Core/ Entity/ ContentEntityNullStorage.php 
- Determines if the storage contains any data.
- KeyValueEntityStorage::hasData in core/lib/ Drupal/ Core/ Entity/ KeyValueStore/ KeyValueEntityStorage.php 
- Determines if the storage contains any data.
File
- 
              core/lib/ Drupal/ Core/ Entity/ EntityStorageBase.php, line 647 
Class
- EntityStorageBase
- A base entity storage class.
Namespace
Drupal\Core\EntityCode
public function hasData() {
  return (bool) $this->getQuery()
    ->accessCheck(FALSE)
    ->range(0, 1)
    ->execute();
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
