You are here

function entity_update_get_entity_type in Entity Update 2.0.x

Same name and namespace in other branches
  1. 8 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.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

3 calls to entity_update_get_entity_type()
drush_entity_update in drush/entity_update.drush8.inc
Call back function of entity-update.
EntityUpdateExec::submitFormSafe in src/Form/EntityUpdateExec.php
Run updates using safe (full) method.
EntityUpdatesCommands::entityUpdates in src/Commands/EntityUpdatesCommands.php
Apply pending entity schema updates.

File

./entity_update.module, line 117
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();
}