You are here

protected function ContentLoader::getEntityStorage in YAML Content 8

Load an entity storage handler.

Parameters

string $entity_type: The entity type id of the definition to load.

Return value

\Drupal\Core\Entity\EntityStorageInterface The storage handler service for the entity type.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

2 calls to ContentLoader::getEntityStorage()
ContentLoader::createEntity in src/ContentLoader/ContentLoader.php
Create the entity based on basic properties.
ContentLoader::entityExists in src/ContentLoader/ContentLoader.php
Query if a target entity already exists and should be updated.

File

src/ContentLoader/ContentLoader.php, line 276

Class

ContentLoader
ContentLoader class for parsing and importing YAML content.

Namespace

Drupal\yaml_content\ContentLoader

Code

protected function getEntityStorage($entity_type) {
  return $this
    ->getEntityTypeManager()
    ->getStorage($entity_type);
}