You are here

public function CommerceExampleOrderMigration::__construct in Commerce Migrate 7

General initialization of a Migration object.

Overrides CommerceMigrateExampleMigration::__construct

File

commerce_migrate_example/migrations/order.inc, line 15
Import orders and attach line items with products to them.

Class

CommerceExampleOrderMigration
Class CommerceExampleOrderMigration.

Code

public function __construct(array $arguments) {
  parent::__construct($arguments);
  $this
    ->buildMap(MigrateDestinationEntityAPI::getKeySchema('commerce_order'));
  $this
    ->setDescription(t('Import orders with line items from CSV file (with no header).'));
  $this
    ->setDestination(new MigrateDestinationEntityAPI('commerce_order', 'commerce_order'));
  $this
    ->addSimpleMappings(array_keys(static::csvColumns()));
  $this
    ->addUnmigratedDestinations(array(
    'uid',
    'type',
    'path',
    'owner',
    'created',
    'changed',
    'commerce_line_items',
    'commerce_order_total',
    'commerce_customer_billing',
    'commerce_order_total:currency_code',
  ));
}