You are here

public function EntityTestNoLoadStorage::load in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/entity_test/src/EntityTestNoLoadStorage.php \Drupal\entity_test\EntityTestNoLoadStorage::load()
  2. 9 core/modules/system/tests/modules/entity_test/src/EntityTestNoLoadStorage.php \Drupal\entity_test\EntityTestNoLoadStorage::load()

Loads one entity.

Parameters

mixed $id: The ID of the entity to load.

Return value

\Drupal\Core\Entity\EntityInterface|null An entity object. NULL if no matching entity is found.

Overrides EntityStorageBase::load

File

core/modules/system/tests/modules/entity_test/src/EntityTestNoLoadStorage.php, line 16

Class

EntityTestNoLoadStorage
Test storage class used to verify that no load operation is triggered.

Namespace

Drupal\entity_test

Code

public function load($id) {
  throw new EntityStorageException('No load operation is supposed to happen.');
}