function ContentTranslationUpdatesManager::__construct
Constructs an updates manager instance.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Entity\EntityDefinitionUpdateManagerInterface $update_manager: The entity definition update manager.
\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager.
\Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository: The installed entity definition repository.
File
-
core/
modules/ content_translation/ src/ ContentTranslationUpdatesManager.php, line 62
Class
- ContentTranslationUpdatesManager
- Provides the logic needed to update field storage definitions when needed.
Namespace
Drupal\content_translationCode
public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityDefinitionUpdateManagerInterface $update_manager, EntityFieldManagerInterface $entity_field_manager = NULL, EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository = NULL) {
$this->entityTypeManager = $entity_type_manager;
$this->updateManager = $update_manager;
if (!$entity_field_manager) {
$entity_field_manager = \Drupal::service('entity_field.manager');
}
$this->entityFieldManager = $entity_field_manager;
if (!$entity_last_installed_schema_repository) {
$entity_last_installed_schema_repository = \Drupal::service('entity.last_installed_schema.repository');
}
$this->entityLastInstalledSchemaRepository = $entity_last_installed_schema_repository;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.