You are here

public function MigrateDestinationCommerceProductType::prepare in Commerce Migrate 7

Give handlers a shot at modifying the object before saving it.

Parameters

$product_type: Object to build. Prefilled with any fields mapped in the Migration.

$source_row: Raw source data object - passed through to prepare handlers.

1 call to MigrateDestinationCommerceProductType::prepare()
MigrateDestinationCommerceProductType::import in plugins/destinations/commerce_product_type.inc
Import a single product type.

File

plugins/destinations/commerce_product_type.inc, line 161
Support for commerce product types.

Class

MigrateDestinationCommerceProductType
Destination class implementing migration into commerce product types.

Code

public function prepare($product_type, stdClass $source_row) {
  $migration = Migration::currentMigration();
  $product_type->migrate = array(
    'machineName' => $migration
      ->getMachineName(),
  );
  if (method_exists($migration, 'prepare')) {
    $migration
      ->prepare($product_type, $source_row);
  }
}