public function ProductVariation::prepareRow in Commerce Migrate 3.1.x
Same name and namespace in other branches
- 8.2 modules/csv_example/src/Plugin/migrate/source/ProductVariation.php \Drupal\commerce_migrate_csv_example\Plugin\migrate\source\ProductVariation::prepareRow()
- 3.0.x modules/csv_example/src/Plugin/migrate/source/ProductVariation.php \Drupal\commerce_migrate_csv_example\Plugin\migrate\source\ProductVariation::prepareRow()
File
- modules/
csv_example/ src/ Plugin/ migrate/ source/ ProductVariation.php, line 22
Class
- ProductVariation
- Gets the product variations 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);
}