Loading core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php +7 −0 Changes for core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php: 7 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -316,6 +316,13 @@ protected function has($id, EntityInterface $entity) { return !$config->isNew(); } /** * {@inheritdoc} */ public function hasData() { return (bool) $this->configFactory->listAll($this->getPrefix()); } /** * Gets entities from the static cache. * Loading core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php +0 −10 Changes for core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php: 0 added lines, 10 removed lines. Original line number Diff line number Diff line Loading @@ -62,16 +62,6 @@ public static function createInstance(ContainerInterface $container, EntityTypeI ); } /** * {@inheritdoc} */ public function hasData() { return (bool) $this->getQuery() ->accessCheck(FALSE) ->range(0, 1) ->execute(); } /** * {@inheritdoc} */ Loading core/lib/Drupal/Core/Entity/DynamicallyFieldableEntityStorageInterface.php +0 −8 Changes for core/lib/Drupal/Core/Entity/DynamicallyFieldableEntityStorageInterface.php: 0 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -18,14 +18,6 @@ */ interface DynamicallyFieldableEntityStorageInterface extends FieldableEntityStorageInterface, FieldStorageDefinitionListenerInterface, FieldDefinitionListenerInterface { /** * Determines if the storage contains any data. * * @return bool * TRUE if the storage contains data, FALSE if not. */ public function hasData(); /** * Purges a batch of field data. * Loading core/lib/Drupal/Core/Entity/EntityStorageBase.php +10 −0 Changes for core/lib/Drupal/Core/Entity/EntityStorageBase.php: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -505,6 +505,16 @@ public function loadByProperties(array $values = []) { return $result ? $this->loadMultiple($result) : []; } /** * {@inheritdoc} */ public function hasData() { return (bool) $this->getQuery() ->accessCheck(FALSE) ->range(0, 1) ->execute(); } /** * {@inheritdoc} */ Loading core/lib/Drupal/Core/Entity/EntityStorageInterface.php +8 −0 Changes for core/lib/Drupal/Core/Entity/EntityStorageInterface.php: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -142,6 +142,14 @@ public function delete(array $entities); */ public function save(EntityInterface $entity); /** * Determines if the storage contains any data. * * @return bool * TRUE if the storage contains data, FALSE if not. */ public function hasData(); /** * Gets an entity query instance. * Loading Loading
core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php +7 −0 Changes for core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php: 7 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -316,6 +316,13 @@ protected function has($id, EntityInterface $entity) { return !$config->isNew(); } /** * {@inheritdoc} */ public function hasData() { return (bool) $this->configFactory->listAll($this->getPrefix()); } /** * Gets entities from the static cache. * Loading
core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php +0 −10 Changes for core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php: 0 added lines, 10 removed lines. Original line number Diff line number Diff line Loading @@ -62,16 +62,6 @@ public static function createInstance(ContainerInterface $container, EntityTypeI ); } /** * {@inheritdoc} */ public function hasData() { return (bool) $this->getQuery() ->accessCheck(FALSE) ->range(0, 1) ->execute(); } /** * {@inheritdoc} */ Loading
core/lib/Drupal/Core/Entity/DynamicallyFieldableEntityStorageInterface.php +0 −8 Changes for core/lib/Drupal/Core/Entity/DynamicallyFieldableEntityStorageInterface.php: 0 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -18,14 +18,6 @@ */ interface DynamicallyFieldableEntityStorageInterface extends FieldableEntityStorageInterface, FieldStorageDefinitionListenerInterface, FieldDefinitionListenerInterface { /** * Determines if the storage contains any data. * * @return bool * TRUE if the storage contains data, FALSE if not. */ public function hasData(); /** * Purges a batch of field data. * Loading
core/lib/Drupal/Core/Entity/EntityStorageBase.php +10 −0 Changes for core/lib/Drupal/Core/Entity/EntityStorageBase.php: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -505,6 +505,16 @@ public function loadByProperties(array $values = []) { return $result ? $this->loadMultiple($result) : []; } /** * {@inheritdoc} */ public function hasData() { return (bool) $this->getQuery() ->accessCheck(FALSE) ->range(0, 1) ->execute(); } /** * {@inheritdoc} */ Loading
core/lib/Drupal/Core/Entity/EntityStorageInterface.php +8 −0 Changes for core/lib/Drupal/Core/Entity/EntityStorageInterface.php: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -142,6 +142,14 @@ public function delete(array $entities); */ public function save(EntityInterface $entity); /** * Determines if the storage contains any data. * * @return bool * TRUE if the storage contains data, FALSE if not. */ public function hasData(); /** * Gets an entity query instance. * Loading