EntityDefinitionUpdateManager::getEntityType

public EntityDefinitionUpdateManager::getEntityType($entity_type_id)

Returns an entity type definition ready to be manipulated.

When needing to apply updates to existing entity type definitions, this method should always be used to retrieve a definition ready to be manipulated.

Parameters

string $entity_type_id: The entity type identifier.

Return value

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

Overrides EntityDefinitionUpdateManagerInterface::getEntityType

File

core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php, line 125

Class

EntityDefinitionUpdateManager
Manages entity definition updates.

Namespace

Drupal\Core\Entity

Code

public function getEntityType($entity_type_id) {
  $entity_type = $this->entityManager->getLastInstalledDefinition($entity_type_id);
  return $entity_type ? clone $entity_type : NULL;
}
doc_Drupal
2016-10-29 09:05:00
Comments
Leave a Comment

Please login to continue.