You are here

public function CommerceExampleProductLineItemMigration::prepareRow in Commerce Migrate 7

Default implementation of prepareRow(). This method is called from the source plugin upon first pulling the raw data from the source.

Parameters

$row: Object containing raw source data.

Return value

bool TRUE to process this row, FALSE to have the source skip it.

Overrides Migration::prepareRow

File

commerce_migrate_example/migrations/product_line_item.inc, line 70
Import line items of the "product" type.

Class

CommerceExampleProductLineItemMigration
Class CommerceExampleProductLineItemMigration.

Code

public function prepareRow($row) {

  // Import the line items only if product's SKU starts from "6".
  return $row->sku[0] == 6 && parent::prepareRow($row);
}