You are here

public function MerciLineItemMigration::prepareRow in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.3

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

merci_migrate/merci_line_item.inc, line 49

Class

MerciLineItemMigration

Code

public function prepareRow($row) {
  $status = array(
    1 => 'pending',
    2 => 'reserved',
    3 => 'checked out',
    4 => 'returned',
  );
  if ($row->merci_reservation_status <= 4) {
    $row->merci_reservation_status = $status[$row->merci_reservation_status];
  }
  else {
    $row->merci_reservation_status = 'returned';
  }
  $row->field_merci_date_value = $row->field_merci_date_value . ' UTC';
  $row->field_merci_date_value2 = $row->field_merci_date_value2 . ' UTC';
  return TRUE;
}