public function Product::prepareRow in Commerce Migrate 3.0.x
Same name in this branch
- 3.0.x modules/csv_example/src/Plugin/migrate/source/Product.php \Drupal\commerce_migrate_csv_example\Plugin\migrate\source\Product::prepareRow()
- 3.0.x modules/ubercart/src/Plugin/migrate/source/uc7/Product.php \Drupal\commerce_migrate_ubercart\Plugin\migrate\source\uc7\Product::prepareRow()
- 3.0.x modules/ubercart/src/Plugin/migrate/source/uc6/Product.php \Drupal\commerce_migrate_ubercart\Plugin\migrate\source\uc6\Product::prepareRow()
Same name and namespace in other branches
- 8.2 modules/csv_example/src/Plugin/migrate/source/Product.php \Drupal\commerce_migrate_csv_example\Plugin\migrate\source\Product::prepareRow()
- 3.1.x modules/csv_example/src/Plugin/migrate/source/Product.php \Drupal\commerce_migrate_csv_example\Plugin\migrate\source\Product::prepareRow()
File
- modules/
csv_example/ src/ Plugin/ migrate/ source/ Product.php, line 68
Class
- Product
- Builds the product rows.
Namespace
Drupal\commerce_migrate_csv_example\Plugin\migrate\sourceCode
public function prepareRow(Row $row) {
// Trim all the source values.
foreach ($row
->getSource() as $key => $value) {
if (is_string($value)) {
$row
->setSourceProperty($key, trim($value));
}
}
return parent::prepareRow($row);
}