class User
Same name in this branch
- 9 core/modules/user/src/Entity/User.php \Drupal\user\Entity\User
- 9 core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User
- 9 core/modules/user/src/Plugin/views/argument_default/User.php \Drupal\user\Plugin\views\argument_default\User
- 9 core/modules/user/src/Plugin/migrate/source/d6/User.php \Drupal\user\Plugin\migrate\source\d6\User
- 9 core/modules/user/src/Plugin/migrate/source/d7/User.php \Drupal\user\Plugin\migrate\source\d7\User
Same name in other branches
- 8.9.x core/modules/user/src/Entity/User.php \Drupal\user\Entity\User
- 8.9.x core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User
- 8.9.x core/modules/user/src/Plugin/views/argument_default/User.php \Drupal\user\Plugin\views\argument_default\User
- 8.9.x core/modules/user/src/Plugin/migrate/source/d6/User.php \Drupal\user\Plugin\migrate\source\d6\User
- 8.9.x core/modules/user/src/Plugin/migrate/source/d7/User.php \Drupal\user\Plugin\migrate\source\d7\User
- 8.9.x core/modules/user/src/Plugin/migrate/User.php \Drupal\user\Plugin\migrate\User
- 10 core/modules/user/src/Entity/User.php \Drupal\user\Entity\User
- 10 core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User
- 10 core/modules/user/src/Plugin/views/argument_default/User.php \Drupal\user\Plugin\views\argument_default\User
- 10 core/modules/user/src/Plugin/migrate/source/d6/User.php \Drupal\user\Plugin\migrate\source\d6\User
- 10 core/modules/user/src/Plugin/migrate/source/d7/User.php \Drupal\user\Plugin\migrate\source\d7\User
- 10 core/modules/user/src/Plugin/migrate/User.php \Drupal\user\Plugin\migrate\User
- 11.x core/modules/user/src/Entity/User.php \Drupal\user\Entity\User
- 11.x core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User
- 11.x core/modules/user/src/Plugin/views/argument_default/User.php \Drupal\user\Plugin\views\argument_default\User
- 11.x core/modules/user/src/Plugin/migrate/source/d6/User.php \Drupal\user\Plugin\migrate\source\d6\User
- 11.x core/modules/user/src/Plugin/migrate/source/d7/User.php \Drupal\user\Plugin\migrate\source\d7\User
- 11.x core/modules/user/src/Plugin/migrate/User.php \Drupal\user\Plugin\migrate\User
Plugin class for Drupal 7 user migrations dealing with fields and profiles.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait
- class \Drupal\migrate\Plugin\Migration extends \Drupal\Core\Plugin\PluginBase implements \Drupal\migrate\Plugin\MigrationInterface, \Drupal\migrate\Plugin\RequirementsInterface, \Drupal\Core\Plugin\ContainerFactoryPluginInterface
- class \Drupal\migrate_drupal\Plugin\migrate\FieldMigration extends \Drupal\migrate\Plugin\Migration implements \Drupal\Core\Plugin\ContainerFactoryPluginInterface
- class \Drupal\user\Plugin\migrate\User extends \Drupal\migrate_drupal\Plugin\migrate\FieldMigration
- class \Drupal\migrate_drupal\Plugin\migrate\FieldMigration extends \Drupal\migrate\Plugin\Migration implements \Drupal\Core\Plugin\ContainerFactoryPluginInterface
- class \Drupal\migrate\Plugin\Migration extends \Drupal\Core\Plugin\PluginBase implements \Drupal\migrate\Plugin\MigrationInterface, \Drupal\migrate\Plugin\RequirementsInterface, \Drupal\Core\Plugin\ContainerFactoryPluginInterface
- class \Drupal\Core\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait
Expanded class hierarchy of User
929 string references to 'User'
- AccessPermissionTest::setUp in core/
modules/ user/ tests/ src/ Kernel/ Views/ AccessPermissionTest.php - AccessResult::cachePerUser in core/
lib/ Drupal/ Core/ Access/ AccessResult.php - Convenience method, adds the "user" cache context.
- AccessResultTest::testCacheContexts in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessResultTest.php - @covers ::addCacheContexts @covers ::resetCacheContexts @covers ::getCacheContexts @covers ::cachePerPermissions @covers ::cachePerUser @covers ::allowedIfHasPermission
- AccessResultTest::testCacheTags in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessResultTest.php - @covers ::addCacheTags @covers ::addCacheableDependency @covers ::getCacheTags @covers ::resetCacheTags
- AccessResultTest::testInheritCacheability in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessResultTest.php - @covers ::inheritCacheability
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 | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
DerivativeInspectionInterface::getBaseId | public | function | Gets the base_plugin_id of the plugin instance. | 1 | |
DerivativeInspectionInterface::getDerivativeId | public | function | Gets the derivative_id of the plugin instance. | 1 | |
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 | Creates an instance of the plugin. | Overrides Migration::create | |
FieldMigration::__construct | public | function | Constructs a FieldMigration. | Overrides Migration::__construct | |
Migration::$audit | protected | property | Whether the migration is auditable. | ||
Migration::$dependencies | protected | property | The migration's configuration dependencies. | ||
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::$row | protected | property | The plugin ID for the row. | ||
Migration::$source | protected | property | The source configuration, with at least a 'plugin' key. | ||
Migration::$sourceIds | protected | property | The source identifiers. | ||
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 | protected | property | Track time of last import if TRUE. | ||
Migration::allRowsProcessed | public | function | Check if all source rows from this migration have been processed. | Overrides MigrationInterface::allRowsProcessed | |
Migration::checkRequirements | public | function | Checks if requirements for this plugin are OK. | Overrides RequirementsInterface::checkRequirements | |
Migration::clearInterruptionResult | public | function | Clears the result to return upon interruption. | Overrides MigrationInterface::clearInterruptionResult | |
Migration::findMigrationDependencies | protected | function | Find migration dependencies from migration_lookup and sub_process plugins. | ||
Migration::getDestinationConfiguration | public | function | Get the destination configuration, with at least a 'plugin' key. | Overrides MigrationInterface::getDestinationConfiguration | |
Migration::getDestinationIds | public | function | The destination identifiers. | Overrides MigrationInterface::getDestinationIds | |
Migration::getDestinationPlugin | public | function | Returns the initialized destination plugin. | Overrides MigrationInterface::getDestinationPlugin | |
Migration::getIdMap | public | function | Returns the initialized id_map plugin. | Overrides MigrationInterface::getIdMap | |
Migration::getIdMapPlugin | public | function | Retrieves the ID map plugin. | ||
Migration::getInterruptionResult | public | function | Get the result to return upon interruption. | 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 | The migration tags. | Overrides MigrationInterface::getMigrationTags | |
Migration::getPluginDefinition | public | function | Gets the definition of the plugin implementation. | Overrides PluginInspectionInterface::getPluginDefinition | |
Migration::getProcessNormalized | protected | function | Resolve shorthands into a list of plugin configurations. | ||
Migration::getProcessPlugins | public | function | Returns the process plugins. | Overrides MigrationInterface::getProcessPlugins | |
Migration::getRequirements | public | function | Get a list of required plugin IDs. | Overrides MigrationInterface::getRequirements | |
Migration::getSourceConfiguration | public | function | Get the source configuration, with at least a 'plugin' key. | Overrides MigrationInterface::getSourceConfiguration | |
Migration::getSourcePlugin | public | function | Returns the initialized source plugin. | Overrides MigrationInterface::getSourcePlugin | |
Migration::getStatus | public | function | Get the current migration status. | Overrides MigrationInterface::getStatus | |
Migration::getStatusLabel | public | function | Retrieve a label for the current status. | Overrides MigrationInterface::getStatusLabel | |
Migration::getTrackLastImported | public | function | If true, track time of last import. | Overrides MigrationInterface::getTrackLastImported | |
Migration::id | public | function | An alias for getPluginId() for backwards compatibility reasons. | Overrides MigrationInterface::id | 1 |
Migration::interruptMigration | public | function | Sets the migration status as interrupted with a given result code. | Overrides MigrationInterface::interruptMigration | |
Migration::isAuditable | public | function | Indicates if the migration is auditable. | Overrides MigrationInterface::isAuditable | |
Migration::isTrackLastImported | public | function | Checks if the migration should track time of last import. | Overrides MigrationInterface::isTrackLastImported | |
Migration::label | public | function | Get the plugin label. | Overrides MigrationInterface::label | |
Migration::mergeProcessOfProperty | public | function | Merge the process pipeline configuration for a single property. | Overrides MigrationInterface::mergeProcessOfProperty | |
Migration::set | public | function | 1 | ||
Migration::setProcess | public | function | Allows you to override the entire process configuration. | Overrides MigrationInterface::setProcess | |
Migration::setProcessOfProperty | public | function | Set the process pipeline configuration for an individual destination field. | Overrides MigrationInterface::setProcessOfProperty | |
Migration::setStatus | public | function | Set the current migration status. | Overrides MigrationInterface::setStatus | |
Migration::setTrackLastImported | public | function | Set if the migration should track time of last import. | 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. | |||
PluginInspectionInterface::getPluginId | public | function | Gets the plugin_id of the plugin instance. | 2 | |
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.