You are here

public function MigrateDestinationPollim::fields in Poll Improved 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

./pollim.migrate.inc, line 63
Code for pollim.migrate.inc.

Class

MigrateDestinationPollim
Destination class implementing migration into pollim.

Code

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

  // First the core (pollim table) properties.
  $fields['pollim_id'] = t('Pollim ID');
  $fields['name'] = t('Pollim: Name');
  $fields['type'] = t('Pollim: Bundle');
  $fields['created'] = t('Pollim: Created timestamp');
  $fields['changed'] = t('Pollim: Modified timestamp');
  $fields['language'] = t('Pollim: Language (fr, en, ...)');
  $fields['is_new'] = t('Option: Indicates a new pollim with the specified pollim_id should be created');

  // Then add in anything provided by handlers.
  $fields += migrate_handler_invoke_all('Entity', 'fields', $this->entityType, $this->bundle, $migration);
  $fields += migrate_handler_invoke_all('Pollim', 'fields', $this->entityType, $this->bundle, $migration);
  return $fields;
}