summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php')
-rw-r--r--core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
index 6415285..3a65176 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
@@ -45,6 +45,16 @@ abstract class ContentEntityStorageBase extends EntityStorageBase implements Dyn
/**
* {@inheritdoc}
*/
+ public function hasData() {
+ return (bool) $this->getQuery()
+ ->accessCheck(FALSE)
+ ->range(0, 1)
+ ->execute();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
protected function doCreate(array $values) {
// We have to determine the bundle first.
$bundle = FALSE;