class User in Zircon Profile 8
Same name in this branch
- 8 core/modules/user/src/Entity/User.php \Drupal\user\Entity\User
- 8 core/modules/user/src/Plugin/views/argument_default/User.php \Drupal\user\Plugin\views\argument_default\User
- 8 core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User
- 8 core/modules/user/src/Plugin/migrate/source/d6/User.php \Drupal\user\Plugin\migrate\source\d6\User
- 8 core/modules/user/src/Plugin/migrate/source/d7/User.php \Drupal\user\Plugin\migrate\source\d7\User
- 8 core/modules/user/src/Plugin/migrate/builder/d7/User.php \Drupal\user\Plugin\migrate\builder\d7\User
Same name and namespace in other branches
- 8.0 core/modules/user/src/Plugin/migrate/builder/d7/User.php \Drupal\user\Plugin\migrate\builder\d7\User
Plugin annotation
@PluginID("d7_user");
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTrait
- class \Drupal\migrate\Plugin\migrate\builder\BuilderBase implements MigrateBuilderInterface
- class \Drupal\user\Plugin\migrate\builder\d7\User implements ContainerFactoryPluginInterface
- class \Drupal\migrate\Plugin\migrate\builder\BuilderBase implements MigrateBuilderInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTrait
Expanded class hierarchy of User
27 string references to 'User'
- BulkFormAccessTest::testUserEditAccess in core/
modules/ user/ src/ Tests/ Views/ BulkFormAccessTest.php - Tests if users that may not be edited, can not be edited in bulk.
- CategoryAutocompleteTest::providerTestAutocompleteSuggestions in core/
modules/ block/ tests/ src/ Unit/ CategoryAutocompleteTest.php - Data provider for testAutocompleteSuggestions().
- CategoryAutocompleteTest::setUp in core/
modules/ block/ tests/ src/ Unit/ CategoryAutocompleteTest.php - contact_entity_extra_field_info in core/
modules/ contact/ contact.module - Implements hook_entity_extra_field_info().
- ContextPluginTest::testContext in core/
modules/ system/ src/ Tests/ Plugin/ ContextPluginTest.php - Tests basic context definition and value getters and setters.
File
- core/
modules/ user/ src/ Plugin/ migrate/ builder/ d7/ User.php, line 20 - Contains \Drupal\user\Plugin\migrate\builder\d7\User.
Namespace
Drupal\user\Plugin\migrate\builder\d7View source
class User extends BuilderBase implements ContainerFactoryPluginInterface {
/**
* The module handler service.
*
* @var \Drupal\Core\Extension\ModuleHandlerInterface
*/
protected $moduleHandler;
/**
* Constructs a d7_user builder plugin instance.
*
* @param array $configuration
* The plugin configuration.
* @param string $plugin_id
* The plugin ID.
* @param mixed $plugin_definition
* The plugin definition.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler service.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, ModuleHandlerInterface $module_handler) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->moduleHandler = $module_handler;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('module_handler'));
}
/**
* {@inheritdoc}
*/
public function buildMigrations(array $template) {
$migration = Migration::create($template);
if ($this->moduleHandler
->moduleExists('field')) {
$template['source']['entity_type'] = 'user';
$source_plugin = $this
->getSourcePlugin('d7_field_instance', $template['source']);
foreach ($source_plugin as $field) {
$field_name = $field
->getSourceProperty('field_name');
$migration
->setProcessOfProperty($field_name, $field_name);
}
}
try {
$profile_fields = $this
->getSourcePlugin('profile_field', $template['source']);
// Ensure that Profile is enabled in the source DB.
$profile_fields
->checkRequirements();
foreach ($profile_fields as $field) {
$field_name = $field
->getSourceProperty('name');
$migration
->setProcessOfProperty($field_name, $field_name);
}
} catch (RequirementsException $e) {
// Profile is not enabled in the source DB, so don't do anything.
}
return [
$migration,
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BuilderBase:: |
protected | function | Returns a fully initialized instance of a source plugin. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 2 |
PluginBase:: |
protected | property | The plugin implementation definition. | |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
User:: |
protected | property | The module handler service. | |
User:: |
public | function |
Builds migration entities based on a template. Overrides MigrateBuilderInterface:: |
|
User:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
|
User:: |
public | function |
Constructs a d7_user builder plugin instance. Overrides PluginBase:: |