You are here

public function MigrateDestinationRelation::fields in Relation 7

Same name and namespace in other branches
  1. 8.2 relation_migrate/relation_migrate.destination.inc \MigrateDestinationRelation::fields()
  2. 8 relation_migrate/relation_migrate.destination.inc \MigrateDestinationRelation::fields()

Returns a list of fields available to be mapped for the relation type (bundle)

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

relation_migrate/relation_migrate.destination.inc, line 42
Support for relation destinations.

Class

MigrateDestinationRelation
Destination class implementing migration into relation.

Code

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

  // First the core (relation table) properties
  $fields['rid'] = t('Relation: Existing relation ID');
  $fields['is_new'] = t('Relation: Indicates a new relation with the specified rid should be created');
  $fields['uid'] = t('Relation: Authored by (uid)');
  $fields['created'] = t('Relation: Created timestamp');
  $fields['changed'] = t('Relation: Modified timestamp');

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