You are here

public function MigrateDestinationCRMCoreContact::fields in CRM Core 7

Derived classes must implement fields(), returning a list of available destination fields.

Parameters

Migration $migration: Optionally, the migration containing this destination.

Return value

array Keys: machine names of the fields (to be passed to addFieldMapping) Values: Human-friendly descriptions of the fields.

Overrides MigrateDestination::fields

File

modules/crm_core_contact/includes/crm_core_contact.migrate.inc, line 59
Class MigrateDestinationCRMCoreContact.

Class

MigrateDestinationCRMCoreContact
CRM Contact destination handler.

Code

public function fields($migration = NULL) {
  $fields = array();

  // First the core (contact table) properties.
  $fields['contact_id'] = t('CRM Core Contact: Existing Contact ID');
  $fields['created'] = t('Created timestamp');
  $fields['changed'] = t('Modified timestamp');
  $fields['uid'] = t('Authored by (uid)');
  $fields += migrate_handler_invoke_all('Entity', 'fields', $this->entityType, $this->bundle, $migration);
  return $fields;
}