You are here

class MultiversionStorageSchemaConverterFactory in Multiversion 8.2

Hierarchy

Expanded class hierarchy of MultiversionStorageSchemaConverterFactory

1 string reference to 'MultiversionStorageSchemaConverterFactory'
multiversion.services.yml in ./multiversion.services.yml
multiversion.services.yml
1 service uses MultiversionStorageSchemaConverterFactory
multiversion.schema_converter_factory in ./multiversion.services.yml
Drupal\multiversion\Entity\Storage\Sql\MultiversionStorageSchemaConverterFactory

File

src/Entity/Storage/Sql/MultiversionStorageSchemaConverterFactory.php, line 14

Namespace

Drupal\multiversion\Entity\Storage\Sql
View source
class MultiversionStorageSchemaConverterFactory implements MultiversionStorageSchemaConverterFactoryInterface {

  /**
   * The entity type manager.
   *
   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
   */
  protected $entityTypeManager;

  /**
   * The entity definition update manager service.
   *
   * @var \Drupal\Core\Entity\EntityDefinitionUpdateManagerInterface
   */
  protected $entityDefinitionUpdateManager;

  /**
   * The last installed schema repository service.
   *
   * @var \Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface
   */
  protected $lastInstalledSchemaRepository;

  /**
   * @var \Drupal\Core\KeyValueStore\KeyValueFactoryInterface
   */
  protected $keyValueFactory;

  /**
   * The database connection.
   *
   * @var \Drupal\Core\Database\Connection
   */
  protected $database;

  /**
   * @var \Drupal\Core\Entity\EntityFieldManagerInterface
   */
  protected $entityFieldManager;

  /**
   * @var \Drupal\multiversion\MultiversionManagerInterface
   */
  protected $multiversionManager;

  /**
   * @var \Drupal\workspaces\WorkspaceManagerInterface
   */
  protected $workspaceManager;

  /**
   * MultiversionStorageSchemaConverterFactory constructor.
   *
   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
   * @param \Drupal\Core\Entity\EntityDefinitionUpdateManagerInterface $entity_definition_update_manager
   * @param \Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface $last_installed_schema_repository
   * @param \Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value_factory
   * @param \Drupal\Core\Database\Connection $database
   * @param \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager
   * @param \Drupal\multiversion\MultiversionManagerInterface $multiversion_manager
   * @param \Drupal\workspaces\WorkspaceManagerInterface $workspace_manager
   */
  public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityDefinitionUpdateManagerInterface $entity_definition_update_manager, EntityLastInstalledSchemaRepositoryInterface $last_installed_schema_repository, KeyValueFactoryInterface $key_value_factory, Connection $database, EntityFieldManagerInterface $entity_field_manager, MultiversionManagerInterface $multiversion_manager, WorkspaceManagerInterface $workspace_manager) {
    $this->entityTypeManager = $entity_type_manager;
    $this->entityDefinitionUpdateManager = $entity_definition_update_manager;
    $this->lastInstalledSchemaRepository = $last_installed_schema_repository;
    $this->keyValueFactory = $key_value_factory;
    $this->database = $database;
    $this->entityFieldManager = $entity_field_manager;
    $this->multiversionManager = $multiversion_manager;
    $this->workspaceManager = $workspace_manager;
  }

  /**
   * {@inheritdoc}
   */
  public function getStorageSchemaConverter($entity_type_id) {
    return new MultiversionStorageSchemaConverter($entity_type_id, $this->entityTypeManager, $this->entityDefinitionUpdateManager, $this->lastInstalledSchemaRepository, $this->keyValueFactory
      ->get('entity.storage_schema.sql'), $this->database, $this->entityFieldManager, $this->multiversionManager, $this->workspaceManager);
  }

}

Members