EntityDefinitionUpdateManager::installEntityType

public EntityDefinitionUpdateManager::installEntityType(EntityTypeInterface $entity_type)

Installs a new entity type definition.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.

Overrides EntityDefinitionUpdateManagerInterface::installEntityType

File

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

Class

EntityDefinitionUpdateManager
Manages entity definition updates.

Namespace

Drupal\Core\Entity

Code

public function installEntityType(EntityTypeInterface $entity_type) {
  $this->entityManager->clearCachedDefinitions();
  $this->entityManager->onEntityTypeCreate($entity_type);
}
doc_Drupal
2016-10-29 09:05:00
Comments
Leave a Comment

Please login to continue.