$this->moduleHandler->
invokeAll('module_preinstall',
[$module]);
// Now install the module's schema if necessary.
$this->
installSchema($module);
// Clear plugin manager caches.
\Drupal::
getContainer()->
get('plugin.cache_clearer'
)->
clearCachedDefinitions();
// Set the schema version to the number of the last update provided by
// the module, or the minimum core schema version.
$version = \Drupal::CORE_MINIMUM_SCHEMA_VERSION;
$versions =
$this->updateRegistry->
getAvailableUpdates($module);
if ($versions) { $version =
max(max($versions),
$version);
} // Notify interested components that this module's entity types and
// field storage definitions are new. For example, a SQL-based storage
// handler can use this as an opportunity to create the necessary
// database tables.
// @todo Clean this up in https://www.drupal.org/node/2350111.
$entity_type_manager = \Drupal::
entityTypeManager();
$update_manager = \Drupal::
entityDefinitionUpdateManager();