ContentEntityStorageBase::hasData

public ContentEntityStorageBase::hasData()

Determines if the storage contains any data.

Return value

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

Overrides DynamicallyFieldableEntityStorageInterface::hasData

File

core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php, line 68

Class

ContentEntityStorageBase
Base class for content entity storage handlers.

Namespace

Drupal\Core\Entity

Code

public function hasData() {
  return (bool) $this->getQuery()
    ->accessCheck(FALSE)
    ->range(0, 1)
    ->execute();
}
doc_Drupal
2016-10-29 08:57:34
Comments
Leave a Comment

Please login to continue.