MigrationConfigurationTrait
trait MigrationConfigurationTrait (View source)
Configures the appropriate migrations for a given source Drupal database.
Properties
| protected ConfigFactoryInterface | $configFactory | The config factory service. |
|
| protected MigrationPluginManagerInterface | $migrationPluginManager | The migration plugin manager service. |
|
| protected StateInterface | $state | The state service. |
|
| protected string[] | $followUpMigrationTags | The follow-up migration tags. |
Methods
Gets the database connection for the source Drupal database.
Gets the system data from the system table of the source Drupal database.
Creates the necessary state entries for SqlBase::getDatabase() to work.
Gets the migrations for import.
Returns the follow-up migration tags.
Determines what version of Drupal the source database contains.
Gets the config factory service.
Gets the migration plugin manager service.
Gets the state service.
Details
protected Connection
getConnection(array $database)
Gets the database connection for the source Drupal database.
protected array
getSystemData(Connection $connection)
Gets the system data from the system table of the source Drupal database.
protected
createDatabaseStateSettings(array $database, string $drupal_version)
Creates the necessary state entries for SqlBase::getDatabase() to work.
The state entities created here have to exist before migration plugin instances are created so that derivers such as \Drupal\taxonomy\Plugin\migrate\D6TermNodeDeriver can access the source database.
protected MigrationInterface[]
getMigrations(string $database_state_key, int $drupal_version)
Gets the migrations for import.
protected string[]
getFollowUpMigrationTags()
Returns the follow-up migration tags.
static string|false
getLegacyDrupalVersion(Connection $connection)
Determines what version of Drupal the source database contains.
protected ConfigFactoryInterface
getConfigFactory()
Gets the config factory service.
protected MigrationPluginManagerInterface
getMigrationPluginManager()
Gets the migration plugin manager service.
protected StateInterface
getState()
Gets the state service.