public function EntityTypeManager::getStorage

public EntityTypeManager::getStorage($entity_type)

Creates a new storage instance.

Parameters

string $entity_type: The entity type for this storage.

Return value

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

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

Overrides EntityTypeManagerInterface::getStorage

File

core/lib/Drupal/Core/Entity/EntityTypeManager.php, line 160

Class

EntityTypeManager
Manages entity type plugin definitions.

Namespace

Drupal\Core\Entity

Code

public function getStorage($entity_type) {
  return $this->getHandler($entity_type, 'storage');
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityTypeManager.php/function/EntityTypeManager::getStorage/8.1.x