You are here

public function MigrationDataImport::complete in CRM Core 7

Complete callback for each item.

Parameters

object $entity: Imported entity.

object $row: Row of source values.

File

modules/crm_core_data_import/includes/controllers/MigrationDataImport.inc, line 220
Handler for migration process.

Class

MigrationDataImport
@file Handler for migration process.

Code

public function complete($entity, $row) {

  // Process field collections.
  if (!empty($this->collection_items) && !empty($this->collection_mapping)) {
    $collection_items = $this->collection_items;
    foreach ($collection_items as $collection_item) {
      $this
        ->attachFieldCollection($entity, $row, $collection_item, $this->collection_mapping[$collection_item]['mapping'], $this->collection_mapping[$collection_item]['main_field']);
    }
  }

  // @TODO need add hook
}