public function MigrateDestinationProfile2::fields in Migrate Extras 7.2
Returns a list of fields available to be mapped for the node 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
- ./
profile2.inc, line 64 - Support for profile2 destinations.
Class
- MigrateDestinationProfile2
- Destination class implementing migration into nodes.
Code
public function fields() {
$fields = array();
$type = ucfirst($this->entity_type) . ': ';
// First the core (node table) properties
$fields[$this->entity_key] = $type . t('Existing profile ID');
$fields['uid'] = $type . t('Authored by (uid)');
$fields['revision_uid'] = $type . t('Modified (uid)');
//$fields['created'] = $type . t('Created timestamp');
//$fields['changed'] = $type . t('Modified timestamp');
//$fields['status'] = $type . t('Published');
//$fields['revision'] = $type . t('Create new revision');
$fields['language'] = $type . t('Language (fr, en, ...)');
// Then add in anything provided by handlers
$fields += migrate_handler_invoke_all('Entity', 'fields', $this->entityType, $this->bundle);
$fields += migrate_handler_invoke_all('Profile2', 'fields', $this->entityType, $this->bundle);
return $fields;
}