You are here

function entity_update_get_entity_type in Entity Update 8

Same name and namespace in other branches
  1. 2.0.x entity_update.module \entity_update_get_entity_type()

Gets the entity type definition.

Parameters

string $entity_type_id: The entity type ID.

Return value

\Drupal\Core\Entity\EntityTypeInterface Entity type definition.

2 calls to entity_update_get_entity_type()
drush_entity_update in ./entity_update.drush.inc
Call back function of entity-update.
EntityUpdateExec::submitFormSafe in src/Form/EntityUpdateExec.php
Run updates using safe (full) method.

File

./entity_update.module, line 115
Entity update module (entity_update).

Code

function entity_update_get_entity_type($entity_type_id) {
  $entity_type = \Drupal::entityTypeManager()
    ->getStorage($entity_type_id);
  return $entity_type
    ->getEntityType();
}