function install_core_entity_type_definitions

Same name and namespace in other branches
  1. 9 core/includes/install.core.inc \install_core_entity_type_definitions()
  2. 8.9.x core/includes/install.core.inc \install_core_entity_type_definitions()
  3. 11.x core/includes/install.core.inc \install_core_entity_type_definitions()

Installs entity type definitions provided by core.

2 calls to install_core_entity_type_definitions()
install_config_import_batch in core/includes/install.core.inc
Creates a batch for the config importer to process.
install_profile_modules in core/includes/install.core.inc
Installs required modules via a batch process.

File

core/includes/install.core.inc, line 1605

Code

function install_core_entity_type_definitions() {
    $update_manager = \Drupal::entityDefinitionUpdateManager();
    foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type) {
        if ($entity_type->getProvider() == 'core') {
            $update_manager->installEntityType($entity_type);
        }
    }
}

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