public function EntityTypeManager::getStorage in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/EntityTypeManager.php \Drupal\Core\Entity\EntityTypeManager::getStorage()
- 9 core/lib/Drupal/Core/Entity/EntityTypeManager.php \Drupal\Core\Entity\EntityTypeManager::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.
Overrides EntityTypeManagerInterface::getStorage
File
- core/
lib/ Drupal/ Core/ Entity/ EntityTypeManager.php, line 191
Class
- EntityTypeManager
- Manages entity type plugin definitions.
Namespace
Drupal\Core\EntityCode
public function getStorage($entity_type_id) {
return $this
->getHandler($entity_type_id, 'storage');
}