public function MigrateDestinationUser::fields in Migrate 6.2
Same name and namespace in other branches
- 7.2 plugins/destinations/user.inc \MigrateDestinationUser::fields()
Returns a list of fields available to be mapped for users
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
- plugins/
destinations/ user.inc, line 55 - Support for user destinations.
Class
- MigrateDestinationUser
- Destination class implementing migration into users.
Code
public function fields() {
$fields = array();
// First the core (users table) properties
$fields['uid'] = t('User: <a href="@doc">Existing user ID</a>', array(
'@doc' => 'http://drupal.org/node/1349632#uid',
));
$fields['mail'] = t('User: <a href="@doc">Email address</a>', array(
'@doc' => 'http://drupal.org/node/1349632#mail',
));
$fields['name'] = t('User: <a href="@doc">Username</a>', array(
'@doc' => 'http://drupal.org/node/1349632#name',
));
$fields['pass'] = t('User: <a href="@doc">Password (plain text)</a>', array(
'@doc' => 'http://drupal.org/node/1349632#pass',
));
$fields['status'] = t('User: <a href="@doc">Status</a>', array(
'@doc' => 'http://drupal.org/node/1349632#status',
));
$fields['created'] = t('User: <a href="@doc">Registered timestamp</a>', array(
'@doc' => 'http://drupal.org/node/1349632#created',
));
$fields['access'] = t('User: <a href="@doc">Last access timestamp</a>', array(
'@doc' => 'http://drupal.org/node/1349632#access',
));
$fields['login'] = t('User: <a href="@doc">Last login timestamp</a>', array(
'@doc' => 'http://drupal.org/node/1349632#login',
));
$fields['roles'] = t('User: <a href="@doc">Role IDs</a>', array(
'@doc' => 'http://drupal.org/node/1349632#roles',
));
$fields['role_names'] = t('User: <a href="@doc">Role Names</a>', array(
'@doc' => 'http://drupal.org/node/1349632#role_names',
));
$fields['picture'] = t('User: <a href="@doc">Picture</a>', array(
'@doc' => 'http://drupal.org/node/1349632#picture',
));
$fields['signature'] = t('User: <a href="@doc">Signature</a>', array(
'@doc' => 'http://drupal.org/node/1349632#signature',
));
$fields['signature_format'] = t('User: <a href="@doc">Signature format</a>', array(
'@doc' => 'http://drupal.org/node/1349632#signature_format',
));
$fields['timezone'] = t('User: <a href="@doc">Timezone</a>', array(
'@doc' => 'http://drupal.org/node/1349632#timezone',
));
$fields['language'] = t('User: <a href="@doc">Language</a>', array(
'@doc' => 'http://drupal.org/node/1349632#language',
));
$fields['theme'] = t('User: <a href="@doc">Default theme</a>', array(
'@doc' => 'http://drupal.org/node/1349632#theme',
));
$fields['init'] = t('User: <a href="@doc">Init</a>', array(
'@doc' => 'http://drupal.org/node/1349632#init',
));
// Then add in anything provided by handlers
$fields += migrate_handler_invoke_all('User', 'fields', $this->entityType, $this->bundle);
return $fields;
}