You are here

function _commerce_migrate_commerce_get_entity_type in Commerce Migrate 3.1.x

Same name and namespace in other branches
  1. 8.2 modules/commerce/commerce_migrate_commerce.module \_commerce_migrate_commerce_get_entity_type()
  2. 3.0.x modules/commerce/commerce_migrate_commerce.module \_commerce_migrate_commerce_get_entity_type()

Return the static map process plugin for determining the entity type.

Parameters

string $source: The source field name.

Return value

array A process plugin array.

1 call to _commerce_migrate_commerce_get_entity_type()
commerce_migrate_commerce_migration_plugins_alter in modules/commerce/commerce_migrate_commerce.module
Implements hook_migration_plugins_alter().

File

modules/commerce/commerce_migrate_commerce.module, line 199
Contains commerce_migrate_commerce.module.

Code

function _commerce_migrate_commerce_get_entity_type($source) {
  return [
    [
      'plugin' => 'static_map',
      'source' => $source,
      'bypass' => 'true',
      'map' => [
        // The entity product_display does not exist. It is set in the
        // MigratePrepareRow event to mark the row as a product display.
        'product_display' => 'commerce_product',
        'commerce_product' => 'commerce_product_variation',
        'commerce_customer_profile' => 'profile',
        // Inline conditions are conditions added to the entity add/edit
        // form and those conditions are later mapped to rules
        // conditions when the rule is generated.
        // https://www.drupal.org/project/inline_conditions.
        'inline_conditions' => 'skip',
        // @todo Skip these entities until there is a migration for discounts.
        // https://www.drupal.org/node/2905242
        'commerce_discount' => 'skip',
        'commerce_discount_offer' => 'skip',
        // @todo Skip line item and order until there is a migration for
        // line items. https://www.drupal.org/node/2905245
        'commerce_line_item' => 'skip',
        'commerce_order' => 'skip',
        // @todo Skip these entities until there is a migration for message.
        // https://www.drupal.org/node/2905244
        'message' => 'skip',
        'message_type' => 'skip',
      ],
    ],
    [
      'plugin' => 'skip_on_value',
      'value' => 'skip',
      'method' => 'row',
    ],
  ];
}