You are here

public function PaymentTransaction::prepareRow in Commerce Migrate 8.2

Same name and namespace in other branches
  1. 3.1.x modules/commerce/src/Plugin/migrate/source/commerce1/PaymentTransaction.php \Drupal\commerce_migrate_commerce\Plugin\migrate\source\commerce1\PaymentTransaction::prepareRow()
  2. 3.0.x modules/commerce/src/Plugin/migrate/source/commerce1/PaymentTransaction.php \Drupal\commerce_migrate_commerce\Plugin\migrate\source\commerce1\PaymentTransaction::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/PaymentTransaction.php, line 65

Class

PaymentTransaction
Gets Commerce 1 payment transactions from database.

Namespace

Drupal\commerce_migrate_commerce\Plugin\migrate\source\commerce1

Code

public function prepareRow(Row $row) {
  $nid = $row
    ->getSourceProperty('transaction_id');
  $vid = $row
    ->getSourceProperty('revision_id');
  foreach (array_keys($this
    ->getFields('commerce_payment_transaction')) as $field) {
    $row
      ->setSourceProperty($field, $this
      ->getFieldValues('commerce_payment_transaction', $field, $nid, $vid));
  }
  return parent::prepareRow($row);
}