You are here

private function TaxonomyStorages::getStorage in Client-side Hierarchical Select 8

Same name and namespace in other branches
  1. 8.3 src/TaxonomyStorages.php \Drupal\cshs\TaxonomyStorages::getStorage()
  2. 8.2 src/TaxonomyStorages.php \Drupal\cshs\TaxonomyStorages::getStorage()

Returns the entity storage.

Parameters

string $entity_type: The entity type ID.

Return value

\Drupal\Core\Entity\EntityStorageInterface The entity storage.

2 calls to TaxonomyStorages::getStorage()
TaxonomyStorages::getTermStorage in src/TaxonomyStorages.php
Returns storage of the "taxonomy_term" entities.
TaxonomyStorages::getVocabularyStorage in src/TaxonomyStorages.php
Returns storage of the "taxonomy_vocabulary" entities.

File

src/TaxonomyStorages.php, line 101

Class

TaxonomyStorages
The taxonomy storages.

Namespace

Drupal\cshs

Code

private function getStorage($entity_type) : EntityStorageInterface {
  if (NULL === $this->entityTypeManager) {
    $this->entityTypeManager = \Drupal::service('entity_type.manager');
  }
  return $this->entityTypeManager
    ->getStorage($entity_type);
}