public function BillingProfile::prepareRow in Commerce Migrate 8.2
Same name and namespace in other branches
- 3.1.x modules/commerce/src/Plugin/migrate/source/commerce1/BillingProfile.php \Drupal\commerce_migrate_commerce\Plugin\migrate\source\commerce1\BillingProfile::prepareRow()
- 3.0.x modules/commerce/src/Plugin/migrate/source/commerce1/BillingProfile.php \Drupal\commerce_migrate_commerce\Plugin\migrate\source\commerce1\BillingProfile::prepareRow()
Adds additional data to the row.
Parameters
\Drupal\migrate\Row $row: The row object.
Return value
bool FALSE if this row needs to be skipped.
Overrides SourcePluginBase::prepareRow
File
- modules/
commerce/ src/ Plugin/ migrate/ source/ commerce1/ BillingProfile.php, line 68
Class
- BillingProfile
- Gets Commerce 1 commerce_customer_profile source from database.
Namespace
Drupal\commerce_migrate_commerce\Plugin\migrate\source\commerce1Code
public function prepareRow(Row $row) {
$profile_id = $row
->getSourceProperty('profile_id');
$revision_id = $row
->getSourceProperty('revision_id');
// Get Field API field values.
foreach (array_keys($this
->getFields('commerce_customer_profile', $row
->getSourceProperty('type'))) as $field) {
$row
->setSourceProperty($field, $this
->getFieldValues('commerce_customer_profile', $field, $profile_id, $revision_id));
}
return parent::prepareRow($row);
}