You are here

abstract protected function EntityStorageBase::has in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::has()
  2. 9 core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::has()

Determines if this entity already exists in storage.

Parameters

int|string $id: The original entity ID.

\Drupal\Core\Entity\EntityInterface $entity: The entity being saved.

Return value

bool TRUE if this entity exists in storage, FALSE otherwise.

1 call to EntityStorageBase::has()
EntityStorageBase::doPreSave in core/lib/Drupal/Core/Entity/EntityStorageBase.php
Performs presave entity processing.
4 methods override EntityStorageBase::has()
ConfigEntityStorage::has in core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
Determines if this entity already exists in storage.
ContentEntityNullStorage::has in core/lib/Drupal/Core/Entity/ContentEntityNullStorage.php
Determines if this entity already exists in storage.
KeyValueEntityStorage::has in core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueEntityStorage.php
Determines if this entity already exists in storage.
SqlContentEntityStorage::has in core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php
Determines if this entity already exists in storage.

File

core/lib/Drupal/Core/Entity/EntityStorageBase.php, line 435

Class

EntityStorageBase
A base entity storage class.

Namespace

Drupal\Core\Entity

Code

protected abstract function has($id, EntityInterface $entity);