class FieldMigration
Same name in other branches
- 9 core/modules/migrate_drupal/src/Plugin/migrate/FieldMigration.php \Drupal\migrate_drupal\Plugin\migrate\FieldMigration
- 8.9.x core/modules/migrate_drupal/src/Plugin/migrate/FieldMigration.php \Drupal\migrate_drupal\Plugin\migrate\FieldMigration
- 10 core/modules/migrate_drupal/src/Plugin/migrate/FieldMigration.php \Drupal\migrate_drupal\Plugin\migrate\FieldMigration
Migration plugin class for migrations dealing with field config and values.
Hierarchy
- class \Drupal\migrate_drupal\Plugin\migrate\FieldMigration extends \Drupal\migrate\Plugin\Migration implements \Drupal\Core\Plugin\ContainerFactoryPluginInterface
Expanded class hierarchy of FieldMigration
2 files declare their use of FieldMigration
- D7Comment.php in core/
modules/ comment/ src/ Plugin/ migrate/ D7Comment.php - User.php in core/
modules/ user/ src/ Plugin/ migrate/ User.php
9 string references to 'FieldMigration'
- d6_field.yml in core/
modules/ field/ migrations/ d6_field.yml - core/modules/field/migrations/d6_field.yml
- d6_field_formatter_settings.yml in core/
modules/ field/ migrations/ d6_field_formatter_settings.yml - core/modules/field/migrations/d6_field_formatter_settings.yml
- d6_field_instance.yml in core/
modules/ field/ migrations/ d6_field_instance.yml - core/modules/field/migrations/d6_field_instance.yml
- d6_field_instance_widget_settings.yml in core/
modules/ field/ migrations/ d6_field_instance_widget_settings.yml - core/modules/field/migrations/d6_field_instance_widget_settings.yml
- d7_field.yml in core/
modules/ field/ migrations/ d7_field.yml - core/modules/field/migrations/d7_field.yml
File
-
core/
modules/ migrate_drupal/ src/ Plugin/ migrate/ FieldMigration.php, line 16
Namespace
Drupal\migrate_drupal\Plugin\migrateView source
class FieldMigration extends Migration implements ContainerFactoryPluginInterface {
/**
* Flag indicating whether the field data has been filled already.
*
* @var bool
*/
protected $init = FALSE;
/**
* The migration field discovery service.
*
* @var \Drupal\migrate_drupal\FieldDiscoveryInterface
*/
protected $fieldDiscovery;
/**
* Constructs a FieldMigration.
*
* @param array $configuration
* Plugin configuration.
* @param string $plugin_id
* The plugin ID.
* @param mixed $plugin_definition
* The plugin definition.
* @param \Drupal\migrate\Plugin\MigrationPluginManagerInterface $migration_plugin_manager
* The migration plugin manager.
* @param \Drupal\migrate\Plugin\MigratePluginManager $source_plugin_manager
* The source migration plugin manager.
* @param \Drupal\migrate\Plugin\MigratePluginManager $process_plugin_manager
* The process migration plugin manager.
* @param \Drupal\migrate\Plugin\MigrateDestinationPluginManager $destination_plugin_manager
* The destination migration plugin manager.
* @param \Drupal\migrate\Plugin\MigratePluginManager $id_map_plugin_manager
* The ID map migration plugin manager.
* @param \Drupal\migrate_drupal\FieldDiscoveryInterface $field_discovery
* The migration field discovery service.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationPluginManagerInterface $migration_plugin_manager, MigratePluginManager $source_plugin_manager, MigratePluginManager $process_plugin_manager, MigrateDestinationPluginManager $destination_plugin_manager, MigratePluginManager $id_map_plugin_manager, FieldDiscoveryInterface $field_discovery) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $migration_plugin_manager, $source_plugin_manager, $process_plugin_manager, $destination_plugin_manager, $id_map_plugin_manager);
$this->fieldDiscovery = $field_discovery;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container->get('plugin.manager.migration'), $container->get('plugin.manager.migrate.source'), $container->get('plugin.manager.migrate.process'), $container->get('plugin.manager.migrate.destination'), $container->get('plugin.manager.migrate.id_map'), $container->get('migrate_drupal.field_discovery'));
}
/**
* {@inheritdoc}
*/
public function getProcess() {
if (!$this->init) {
$this->init = TRUE;
$this->fieldDiscovery
->addAllFieldProcesses($this);
}
return parent::getProcess();
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
DerivativeInspectionInterface::getBaseId | public | function | Gets the base_plugin_id of the plugin instance. | 1 | |
DerivativeInspectionInterface::getDerivativeId | public | function | Gets the derivative_id of the plugin instance. | 1 | |
FieldMigration::$fieldDiscovery | protected | property | The migration field discovery service. | ||
FieldMigration::$init | protected | property | Flag indicating whether the field data has been filled already. | ||
FieldMigration::create | public static | function | Overrides Migration::create | ||
FieldMigration::getProcess | public | function | Overrides Migration::getProcess | 2 | |
FieldMigration::__construct | public | function | Constructs a FieldMigration. | Overrides Migration::__construct | |
Migration::$audit | protected | property | Whether the migration is auditable. | ||
Migration::$destination | protected | property | The destination configuration, with at least a 'plugin' key. | ||
Migration::$destinationIds | protected | property | The destination identifiers. | ||
Migration::$destinationPlugin | protected | property | The destination plugin. | ||
Migration::$destinationPluginManager | protected | property | The destination plugin manager. | ||
Migration::$id | protected | property | The migration ID (machine name). | 1 | |
Migration::$idMap | protected | property | The identifier map data. | ||
Migration::$idMapPlugin | protected | property | The identifier map. | ||
Migration::$idMapPluginManager | protected | property | The ID map plugin manager. | ||
Migration::$label | protected | property | The human-readable label for the migration. | ||
Migration::$migrationPluginManager | protected | property | The migration plugin manager for loading other migration plugins. | ||
Migration::$migration_dependencies | protected | property | |||
Migration::$migration_tags | protected | property | |||
Migration::$process | protected | property | The configuration describing the process plugins. | ||
Migration::$processPluginManager | protected | property | The process plugin manager. | ||
Migration::$processPlugins | protected | property | The cached process plugins. | ||
Migration::$requirements | protected | property | These migrations must be already executed before this migration can run. | ||
Migration::$source | protected | property | The source configuration, with at least a 'plugin' key. | ||
Migration::$sourcePlugin | protected | property | The source plugin. | ||
Migration::$sourcePluginManager | protected | property | The source plugin manager. | ||
Migration::$sourceRowStatus | protected | property | The source_row_status for the current map row. | ||
Migration::$statusLabels | protected | property | Labels corresponding to each defined status. | ||
Migration::allRowsProcessed | public | function | Overrides MigrationInterface::allRowsProcessed | ||
Migration::checkRequirements | public | function | Overrides RequirementsInterface::checkRequirements | ||
Migration::clearInterruptionResult | public | function | Overrides MigrationInterface::clearInterruptionResult | ||
Migration::findMigrationDependencies | protected | function | Find migration dependencies from migration_lookup and sub_process plugins. | ||
Migration::getDestinationConfiguration | public | function | Overrides MigrationInterface::getDestinationConfiguration | ||
Migration::getDestinationIds | public | function | Overrides MigrationInterface::getDestinationIds | ||
Migration::getDestinationPlugin | public | function | Overrides MigrationInterface::getDestinationPlugin | ||
Migration::getIdMap | public | function | Overrides MigrationInterface::getIdMap | ||
Migration::getIdMapPlugin | public | function | Retrieves the ID map plugin. | ||
Migration::getInterruptionResult | public | function | Overrides MigrationInterface::getInterruptionResult | ||
Migration::getMigrationDependencies | public | function | Get the dependencies for this migration. | Overrides MigrationInterface::getMigrationDependencies | 1 |
Migration::getMigrationPluginManager | protected | function | Gets the migration plugin manager. | ||
Migration::getMigrationTags | public | function | Overrides MigrationInterface::getMigrationTags | ||
Migration::getPluginDefinition | public | function | Overrides PluginInspectionInterface::getPluginDefinition | ||
Migration::getProcessNormalized | protected | function | Resolve shorthands into a list of plugin configurations. | ||
Migration::getProcessPlugins | public | function | Overrides MigrationInterface::getProcessPlugins | ||
Migration::getRequirements | public | function | Overrides MigrationInterface::getRequirements | ||
Migration::getSourceConfiguration | public | function | Overrides MigrationInterface::getSourceConfiguration | ||
Migration::getSourcePlugin | public | function | Overrides MigrationInterface::getSourcePlugin | ||
Migration::getStatus | public | function | Overrides MigrationInterface::getStatus | ||
Migration::getStatusLabel | public | function | Overrides MigrationInterface::getStatusLabel | ||
Migration::id | public | function | Overrides MigrationInterface::id | 1 | |
Migration::interruptMigration | public | function | Overrides MigrationInterface::interruptMigration | ||
Migration::isAuditable | public | function | Overrides MigrationInterface::isAuditable | ||
Migration::label | public | function | Overrides MigrationInterface::label | ||
Migration::mergeProcessOfProperty | public | function | Overrides MigrationInterface::mergeProcessOfProperty | ||
Migration::set | public | function | 1 | ||
Migration::setProcess | public | function | Overrides MigrationInterface::setProcess | ||
Migration::setProcessOfProperty | public | function | Overrides MigrationInterface::setProcessOfProperty | ||
Migration::setStatus | public | function | Overrides MigrationInterface::setStatus | ||
MigrationInterface::MESSAGE_ERROR | constant | Migration error. | |||
MigrationInterface::MESSAGE_INFORMATIONAL | constant | Migration info. | |||
MigrationInterface::MESSAGE_NOTICE | constant | Migration notice. | |||
MigrationInterface::MESSAGE_WARNING | constant | Migration warning. | |||
MigrationInterface::RESULT_COMPLETED | constant | All records have been processed. | |||
MigrationInterface::RESULT_DISABLED | constant | This migration is disabled, skipping. | |||
MigrationInterface::RESULT_FAILED | constant | The process had a fatal error. | |||
MigrationInterface::RESULT_INCOMPLETE | constant | The process has stopped itself (e.g., the memory limit is approaching). | |||
MigrationInterface::RESULT_SKIPPED | constant | Dependencies are unfulfilled - skip the process. | |||
MigrationInterface::RESULT_STOPPED | constant | The process was stopped externally (e.g., via drush migrate-stop). | |||
MigrationInterface::STATUS_DISABLED | constant | The migration has been disabled. | |||
MigrationInterface::STATUS_IDLE | constant | The migration is currently not running. | |||
MigrationInterface::STATUS_IMPORTING | constant | The migration is currently importing. | |||
MigrationInterface::STATUS_ROLLING_BACK | constant | The migration is currently being rolled back. | |||
MigrationInterface::STATUS_STOPPING | constant | The migration is being stopped. | |||
PluginInspectionInterface::getPluginId | public | function | Gets the plugin ID of the plugin instance. | 2 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.