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