function EntityDefinitionUpdateManager::getEntityTypes

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php \Drupal\Core\Entity\EntityDefinitionUpdateManager::getEntityTypes()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php \Drupal\Core\Entity\EntityDefinitionUpdateManager::getEntityTypes()
  3. 10 core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php \Drupal\Core\Entity\EntityDefinitionUpdateManager::getEntityTypes()

Returns all the entity type definitions, ready to be manipulated.

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

Return value

\Drupal\Core\Entity\EntityTypeInterface[] The last installed entity type definitions, keyed by the entity type ID.

Overrides EntityDefinitionUpdateManagerInterface::getEntityTypes

File

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

Class

EntityDefinitionUpdateManager
Manages entity definition updates.

Namespace

Drupal\Core\Entity

Code

public function getEntityTypes() {
  return $this->entityLastInstalledSchemaRepository
    ->getLastInstalledDefinitions();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.