class User
Plugin class for Drupal 7 user migrations dealing with fields and profiles.
Hierarchy
- class \Drupal\migrate_drupal\Plugin\migrate\FieldMigration implements \Drupal\Core\Plugin\ContainerFactoryPluginInterface extends \Drupal\migrate\Plugin\Migration
- class \Drupal\user\Plugin\migrate\User extends \Drupal\migrate_drupal\Plugin\migrate\FieldMigration
Expanded class hierarchy of User
1006 string references to 'User'
- 2d3581c3-92c7-4600-8991-a0d4b3741198.yml in core/
tests/ fixtures/ default_content/ node/ 2d3581c3-92c7-4600-8991-a0d4b3741198.yml - core/tests/fixtures/default_content/node/2d3581c3-92c7-4600-8991-a0d4b3741198.yml
- 7f1dd75a-0be2-4d3b-be5d-9d1a868b9267.yml in core/
tests/ fixtures/ default_content/ node/ 7f1dd75a-0be2-4d3b-be5d-9d1a868b9267.yml - core/tests/fixtures/default_content/node/7f1dd75a-0be2-4d3b-be5d-9d1a868b9267.yml
- 94503467-be7f-406c-9795-fc25baa22203.yml in core/
tests/ fixtures/ default_content/ user/ 94503467-be7f-406c-9795-fc25baa22203.yml - core/tests/fixtures/default_content/user/94503467-be7f-406c-9795-fc25baa22203.yml
- AccessPermissionTest::setUp in core/
modules/ user/ tests/ src/ Kernel/ Views/ AccessPermissionTest.php - AccessPolicyProcessor::processAccessPolicies in core/
lib/ Drupal/ Core/ Session/ AccessPolicyProcessor.php - Processes the access policies for an account within a given scope.
File
-
core/
modules/ user/ src/ Plugin/ migrate/ User.php, line 11
Namespace
Drupal\user\Plugin\migrateView source
class User extends FieldMigration {
/**
* {@inheritdoc}
*/
public function getProcess() {
if (!$this->init) {
$this->init = TRUE;
$this->fieldDiscovery
->addEntityFieldProcesses($this, 'user');
$definition = [
'source' => [
'plugin' => 'profile_field',
'ignore_map' => TRUE,
],
'idMap' => [
'plugin' => 'null',
],
'destination' => [
'plugin' => 'null',
],
];
try {
$profile_migration = $this->migrationPluginManager
->createStubMigration($definition);
// Ensure that Profile is enabled in the source DB.
$profile_migration->checkRequirements();
foreach ($profile_migration->getSourcePlugin() as $row) {
$name = $row->getSourceProperty('name');
$this->process[$name] = $name;
}
} catch (RequirementsException $e) {
// The checkRequirements() call will fail when the profile module does
// not exist on the source site.
}
}
return parent::getProcess();
}
}
Members
| Title Sort descending | Deprecated | Modifiers | Object type | Summary | Overriden Title | Overrides |
|---|---|---|---|---|---|---|
| DependencySerializationTrait::$_entityStorages | protected | property | An array of entity type IDs keyed by the property name of their storages. | |||
| DependencySerializationTrait::$_serviceIds | protected | property | An array of service IDs keyed by property name used for serialization. | |||
| DependencySerializationTrait::__sleep | public | function | 2 | |||
| DependencySerializationTrait::__wakeup | public | function | #[\ReturnTypeWillChange] | 2 | ||
| FieldMigration::$fieldDiscovery | protected | property | The migration field discovery service. | |||
| FieldMigration::$init | protected | property | Flag indicating whether the field data has been filled already. | |||
| FieldMigration::create | public static | function | Overrides Migration::create | |||
| FieldMigration::__construct | public | function | Constructs a FieldMigration. | Overrides Migration::__construct | ||
| MessengerTrait::$messenger | protected | property | The messenger. | 25 | ||
| MessengerTrait::messenger | public | function | Gets the messenger. | 25 | ||
| MessengerTrait::setMessenger | public | function | Sets the messenger. | |||
| Migration::$audit | protected | property | Whether the migration is auditable. | |||
| Migration::$destination | protected | property | The destination configuration, with at least a 'plugin' key. | |||
| Migration::$destinationIds | protected | property | The destination identifiers. | |||
| Migration::$destinationPlugin | protected | property | The destination plugin. | |||
| Migration::$destinationPluginManager | protected | property | The destination plugin manager. | |||
| Migration::$id | protected | property | The migration ID (machine name). | 1 | ||
| Migration::$idMap | protected | property | The identifier map data. | |||
| Migration::$idMapPlugin | protected | property | The identifier map. | |||
| Migration::$idMapPluginManager | protected | property | The ID map plugin manager. | |||
| Migration::$label | protected | property | The human-readable label for the migration. | |||
| Migration::$migrationPluginManager | protected | property | The migration plugin manager for loading other migration plugins. | |||
| Migration::$migration_dependencies | protected | property | These migrations, if run, must be executed before this migration. | |||
| Migration::$migration_tags | protected | property | An optional list of tags, used by the plugin manager for filtering. | |||
| Migration::$process | protected | property | The configuration describing the process plugins. | |||
| Migration::$processPluginManager | protected | property | The process plugin manager. | |||
| Migration::$processPlugins | protected | property | The cached process plugins. | |||
| Migration::$requirements | protected | property | These migrations must be already executed before this migration can run. | |||
| Migration::$source | protected | property | The source configuration, with at least a 'plugin' key. | |||
| Migration::$sourcePlugin | protected | property | The source plugin. | |||
| Migration::$sourcePluginManager | protected | property | The source plugin manager. | |||
| Migration::$sourceRowStatus | protected | property | The source_row_status for the current map row. | |||
| Migration::$statusLabels | protected | property | Labels corresponding to each defined status. | |||
| Migration::$trackLastImported | Deprecated | protected | property | Track time of last import if TRUE. | ||
| Migration::allRowsProcessed | public | function | Overrides MigrationInterface::allRowsProcessed | |||
| Migration::checkRequirements | public | function | Overrides RequirementsInterface::checkRequirements | |||
| Migration::clearInterruptionResult | public | function | Overrides MigrationInterface::clearInterruptionResult | |||
| Migration::findMigrationDependencies | protected | function | Find migration dependencies from migration_lookup and sub_process plugins. | |||
| Migration::getDestinationConfiguration | public | function | Overrides MigrationInterface::getDestinationConfiguration | |||
| Migration::getDestinationIds | public | function | Overrides MigrationInterface::getDestinationIds | |||
| Migration::getDestinationPlugin | public | function | Overrides MigrationInterface::getDestinationPlugin | |||
| Migration::getIdMap | public | function | Overrides MigrationInterface::getIdMap | |||
| Migration::getIdMapPlugin | public | function | Retrieves the ID map plugin. | |||
| Migration::getInterruptionResult | public | function | Overrides MigrationInterface::getInterruptionResult | |||
| Migration::getMigrationDependencies | public | function | Get the dependencies for this migration. | Overrides MigrationInterface::getMigrationDependencies | 1 | |
| Migration::getMigrationPluginManager | protected | function | Gets the migration plugin manager. | |||
| Migration::getMigrationTags | public | function | Overrides MigrationInterface::getMigrationTags | |||
| Migration::getPluginDefinition | public | function | Overrides PluginBase::getPluginDefinition | |||
| Migration::getProcessNormalized | protected | function | Resolve shorthands into a list of plugin configurations. | |||
| Migration::getProcessPlugins | public | function | Overrides MigrationInterface::getProcessPlugins | |||
| Migration::getRequirements | public | function | Overrides MigrationInterface::getRequirements | |||
| Migration::getSourceConfiguration | public | function | Overrides MigrationInterface::getSourceConfiguration | |||
| Migration::getSourcePlugin | public | function | Overrides MigrationInterface::getSourcePlugin | |||
| Migration::getStatus | public | function | Overrides MigrationInterface::getStatus | |||
| Migration::getStatusLabel | public | function | Overrides MigrationInterface::getStatusLabel | |||
| Migration::getTrackLastImported | public | function | Overrides MigrationInterface::getTrackLastImported | |||
| Migration::id | public | function | Overrides MigrationInterface::id | 1 | ||
| Migration::interruptMigration | public | function | Overrides MigrationInterface::interruptMigration | |||
| Migration::isAuditable | public | function | Overrides MigrationInterface::isAuditable | |||
| Migration::isTrackLastImported | public | function | Overrides MigrationInterface::isTrackLastImported | |||
| Migration::label | public | function | Overrides MigrationInterface::label | |||
| Migration::mergeProcessOfProperty | public | function | Overrides MigrationInterface::mergeProcessOfProperty | |||
| Migration::set | public | function | 1 | |||
| Migration::setProcess | public | function | Overrides MigrationInterface::setProcess | |||
| Migration::setProcessOfProperty | public | function | Overrides MigrationInterface::setProcessOfProperty | |||
| Migration::setStatus | public | function | Overrides MigrationInterface::setStatus | |||
| Migration::setTrackLastImported | public | function | Overrides MigrationInterface::setTrackLastImported | |||
| MigrationInterface::MESSAGE_ERROR | constant | Migration error. | ||||
| MigrationInterface::MESSAGE_INFORMATIONAL | constant | Migration info. | ||||
| MigrationInterface::MESSAGE_NOTICE | constant | Migration notice. | ||||
| MigrationInterface::MESSAGE_WARNING | constant | Migration warning. | ||||
| MigrationInterface::RESULT_COMPLETED | constant | All records have been processed. | ||||
| MigrationInterface::RESULT_DISABLED | constant | This migration is disabled, skipping. | ||||
| MigrationInterface::RESULT_FAILED | constant | The process had a fatal error. | ||||
| MigrationInterface::RESULT_INCOMPLETE | constant | The process has stopped itself (e.g., the memory limit is approaching). | ||||
| MigrationInterface::RESULT_SKIPPED | constant | Dependencies are unfulfilled - skip the process. | ||||
| MigrationInterface::RESULT_STOPPED | constant | The process was stopped externally (e.g., via drush migrate-stop). | ||||
| MigrationInterface::STATUS_DISABLED | constant | The migration has been disabled. | ||||
| MigrationInterface::STATUS_IDLE | constant | The migration is currently not running. | ||||
| MigrationInterface::STATUS_IMPORTING | constant | The migration is currently importing. | ||||
| MigrationInterface::STATUS_ROLLING_BACK | constant | The migration is currently being rolled back. | ||||
| MigrationInterface::STATUS_STOPPING | constant | The migration is being stopped. | ||||
| PluginBase::$configuration | protected | property | Configuration information passed into the plugin. | 1 | ||
| PluginBase::$pluginDefinition | protected | property | The plugin implementation definition. | 1 | ||
| PluginBase::$pluginId | protected | property | The plugin ID. | |||
| PluginBase::DERIVATIVE_SEPARATOR | constant | A string which is used to separate base plugin IDs from the derivative ID. | ||||
| PluginBase::getBaseId | public | function | Gets the base_plugin_id of the plugin instance. | Overrides DerivativeInspectionInterface::getBaseId | ||
| PluginBase::getDerivativeId | public | function | Gets the derivative_id of the plugin instance. | Overrides DerivativeInspectionInterface::getDerivativeId | ||
| PluginBase::getPluginId | public | function | Gets the plugin ID of the plugin instance. | Overrides PluginInspectionInterface::getPluginId | ||
| PluginBase::isConfigurable | public | function | Determines if the plugin is configurable. | |||
| StringTranslationTrait::$stringTranslation | protected | property | The string translation service. | 3 | ||
| StringTranslationTrait::formatPlural | protected | function | Formats a string containing a count of items. | |||
| StringTranslationTrait::getNumberOfPlurals | protected | function | Returns the number of plurals supported by a given language. | |||
| StringTranslationTrait::getStringTranslation | protected | function | Gets the string translation service. | |||
| StringTranslationTrait::setStringTranslation | public | function | Sets the string translation service to use. | 2 | ||
| StringTranslationTrait::t | protected | function | Translates a string to the current language or to a given language. | |||
| User::getProcess | public | function | Gets the normalized process plugin configuration. | Overrides FieldMigration::getProcess |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.