Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php \Drupal\Core\Entity\EntityTypeManagerInterface::getStorage()
  2. 9 core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php \Drupal\Core\Entity\EntityTypeManagerInterface::getStorage()

Creates a new storage instance.

Parameters

string $entity_type_id: The entity type ID for this storage.

Return value

\Drupal\Core\Entity\EntityStorageInterface A storage instance.

Throws

\Drupal\Component\Plugin\Exception\PluginNotFoundException Thrown if the entity type doesn't exist.

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException Thrown if the storage handler couldn't be loaded.

File

core/lib/Drupal/Core/Entity/EntityTypeManagerInterface.php, line 38

Class

EntityTypeManagerInterface
Provides an interface for entity type managers.

Namespace

Drupal\Core\Entity

Code

public function getStorage($entity_type_id);