class Order in Commerce Migrate 8.2
Same name in this branch
- 8.2 modules/commerce/src/Plugin/migrate/Order.php \Drupal\commerce_migrate_commerce\Plugin\migrate\Order
- 8.2 modules/ubercart/src/Plugin/migrate/source/Order.php \Drupal\commerce_migrate_ubercart\Plugin\migrate\source\Order
- 8.2 modules/ubercart/src/Plugin/migrate/source/uc6/Order.php \Drupal\commerce_migrate_ubercart\Plugin\migrate\source\uc6\Order
- 8.2 modules/commerce/src/Plugin/migrate/source/commerce1/Order.php \Drupal\commerce_migrate_commerce\Plugin\migrate\source\commerce1\Order
Same name and namespace in other branches
- 3.1.x modules/commerce/src/Plugin/migrate/Order.php \Drupal\commerce_migrate_commerce\Plugin\migrate\Order
- 3.0.x modules/commerce/src/Plugin/migrate/Order.php \Drupal\commerce_migrate_commerce\Plugin\migrate\Order
Plugin class for Commerce 1 order migrations to handle fields and profiles.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\migrate\Plugin\Migration implements ContainerFactoryPluginInterface, MigrationInterface, RequirementsInterface
- class \Drupal\migrate_drupal\Plugin\migrate\FieldMigration implements ContainerFactoryPluginInterface
- class \Drupal\commerce_migrate_commerce\Plugin\migrate\Order
- class \Drupal\migrate_drupal\Plugin\migrate\FieldMigration implements ContainerFactoryPluginInterface
- class \Drupal\migrate\Plugin\Migration implements ContainerFactoryPluginInterface, MigrationInterface, RequirementsInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of Order
1 string reference to 'Order'
- commerce1_order.yml in modules/
commerce/ migrations/ commerce1_order.yml - modules/commerce/migrations/commerce1_order.yml
File
- modules/
commerce/ src/ Plugin/ migrate/ Order.php, line 11
Namespace
Drupal\commerce_migrate_commerce\Plugin\migrateView source
class Order extends FieldMigration {
/**
* {@inheritdoc}
*/
public function getProcess() {
if (!$this->init) {
$this->init = TRUE;
$this->fieldDiscovery
->addEntityFieldProcesses($this, 'commerce_order');
$definition = [
'source' => [
'plugin' => 'profile_field',
'entity_type' => 'commerce_order',
'ignore_map' => TRUE,
],
'idMap' => [
'plugin' => 'null',
],
'destination' => [
'plugin' => 'null',
],
];
try {
$field_migration = $this->migrationPluginManager
->createStubMigration($definition);
$field_migration
->checkRequirements();
foreach ($field_migration
->getSourcePlugin() as $row) {
$field_name = $row
->getSourceProperty('field_name');
$field_type = $row
->getSourceProperty('type');
$this->process[$field_name] = $field_type;
}
} catch (RequirementsException $e) {
// The checkRequirements() call will fail when the profile module does
// not exist on the source site.
}
}
return parent::getProcess();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
FieldMigration:: |
protected | property | The migration field discovery service. | |
FieldMigration:: |
protected | property | Flag indicating whether the field data has been filled already. | |
FieldMigration:: |
public static | function |
Creates an instance of the plugin. Overrides Migration:: |
|
FieldMigration:: |
constant | Defines which configuration option has the migration processing function. | 1 | |
FieldMigration:: |
public | function |
Constructs a FieldMigration. Overrides Migration:: |
|
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
Migration:: |
protected | property | Whether the migration is auditable. | |
Migration:: |
protected | property | The migration's configuration dependencies. | |
Migration:: |
protected | property | The destination configuration, with at least a 'plugin' key. | |
Migration:: |
protected | property | The destination identifiers. | |
Migration:: |
protected | property | The destination plugin. | |
Migration:: |
protected | property | The destination plugin manager. | |
Migration:: |
protected | property | The migration ID (machine name). | 1 |
Migration:: |
protected | property | The identifier map data. | |
Migration:: |
protected | property | The identifier map. | |
Migration:: |
protected | property | The ID map plugin manager. | |
Migration:: |
protected | property | The human-readable label for the migration. | |
Migration:: |
protected | property | The migration plugin manager for loading other migration plugins. | |
Migration:: |
protected | property | These migrations, if run, must be executed before this migration. | |
Migration:: |
protected | property | An optional list of tags, used by the plugin manager for filtering. | |
Migration:: |
protected | property | The configuration describing the process plugins. | |
Migration:: |
protected | property | The process plugin manager. | |
Migration:: |
protected | property | The cached process plugins. | |
Migration:: |
protected | property | These migrations must be already executed before this migration can run. | |
Migration:: |
protected | property | The plugin ID for the row. | |
Migration:: |
protected | property | The source configuration, with at least a 'plugin' key. | |
Migration:: |
protected | property | The source identifiers. | |
Migration:: |
protected | property | The source plugin. | |
Migration:: |
protected | property | The source plugin manager. | |
Migration:: |
protected | property | Specify value of source_row_status for current map row. Usually set by MigrateFieldHandler implementations. | |
Migration:: |
protected | property | Labels corresponding to each defined status. | |
Migration:: |
protected | property | Track time of last import if TRUE. | |
Migration:: |
public | function |
Check if all source rows from this migration have been processed. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Checks if requirements for this plugin are OK. Overrides RequirementsInterface:: |
|
Migration:: |
public | function |
Clears the result to return upon interruption. Overrides MigrationInterface:: |
|
Migration:: |
protected | function | Find migration dependencies from migration_lookup and sub_process plugins. | |
Migration:: |
public | function | Gets any arbitrary property's value. | |
Migration:: |
public | function |
Get the destination configuration, with at least a 'plugin' key. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
The destination identifiers. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Returns the initialized destination plugin. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Returns the initialized id_map plugin. Overrides MigrationInterface:: |
|
Migration:: |
public | function | Retrieves the ID map plugin. | |
Migration:: |
public | function |
Get the result to return upon interruption. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Get the dependencies for this migration. Overrides MigrationInterface:: |
1 |
Migration:: |
protected | function | Gets the migration plugin manager. | |
Migration:: |
public | function |
The migration tags. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginBase:: |
|
Migration:: |
protected | function | Resolve shorthands into a list of plugin configurations. | |
Migration:: |
public | function |
Returns the process plugins. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Get the source configuration, with at least a 'plugin' key. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Returns the initialized source plugin. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Get the current migration status. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Retrieve a label for the current status. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
If true, track time of last import. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
An alias for getPluginId() for backwards compatibility reasons. Overrides MigrationInterface:: |
1 |
Migration:: |
public | function |
Signal that the migration should be interrupted with the specified result
code. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Indicates if the migration is auditable. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Checks if the migration should track time of last import. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Get the plugin label. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Merge the process pipeline configuration for a single property. Overrides MigrationInterface:: |
|
Migration:: |
public | function | 1 | |
Migration:: |
public | function |
Allows you to override the entire process configuration. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Set the process pipeline configuration for an individual destination field. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Set the current migration status. Overrides MigrationInterface:: |
|
Migration:: |
public | function |
Set if the migration should track time of last import. Overrides MigrationInterface:: |
|
MigrationInterface:: |
constant | Migration error. | ||
MigrationInterface:: |
constant | Migration info. | ||
MigrationInterface:: |
constant | Migration notice. | ||
MigrationInterface:: |
constant | Migration warning. | ||
MigrationInterface:: |
constant | All records have been processed. | ||
MigrationInterface:: |
constant | This migration is disabled, skipping. | ||
MigrationInterface:: |
constant | The process had a fatal error. | ||
MigrationInterface:: |
constant | The process has stopped itself (e.g., the memory limit is approaching). | ||
MigrationInterface:: |
constant | Dependencies are unfulfilled - skip the process. | ||
MigrationInterface:: |
constant | The process was stopped externally (e.g., via drush migrate-stop). | ||
MigrationInterface:: |
constant | The migration has been disabled. | ||
MigrationInterface:: |
constant | The migration is currently not running. | ||
MigrationInterface:: |
constant | The migration is currently importing. | ||
MigrationInterface:: |
constant | The migration is currently being rolled back. | ||
MigrationInterface:: |
constant | The migration is being stopped. | ||
Order:: |
public | function |
Get the normalized process pipeline configuration describing the process
plugins. Overrides FieldMigration:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |