User
class User extends FieldMigration (View source)
Plugin class for Drupal 7 user migrations dealing with fields and profiles.
Traits
Wrapper methods for \Drupal\Core\StringTranslation\TranslationInterface.
Provides dependency injection friendly methods for serialization.
Provides a trait for the messenger service.
Constants
| DERIVATIVE_SEPARATOR |
A string which is used to separate base plugin IDs from the derivative ID. |
Properties
| protected string | $pluginId | The plugin_id. |
from PluginBase |
| protected array | $pluginDefinition | The plugin implementation definition. |
from PluginBase |
| protected array | $configuration | Configuration information passed into the plugin. |
from PluginBase |
| protected TranslationInterface | $stringTranslation | The string translation service. |
from StringTranslationTrait |
| protected array | $_serviceIds | An array of service IDs keyed by property name used for serialization. |
from DependencySerializationTrait |
| protected array | $_entityStorages | An array of entity type IDs keyed by the property name of their storages. |
from DependencySerializationTrait |
| protected MessengerInterface | $messenger | The messenger. |
from MessengerTrait |
| protected string | $id | The migration ID (machine name). |
from Migration |
| protected string | $label | The human-readable label for the migration. |
from Migration |
| protected string | $row | The plugin ID for the row. |
from Migration |
| protected array | $source | The source configuration, with at least a 'plugin' key. |
from Migration |
| protected MigrateSourceInterface | $sourcePlugin | The source plugin. |
from Migration |
| protected array | $process | The configuration describing the process plugins. |
from Migration |
| protected array | $processPlugins | The cached process plugins. |
from Migration |
| protected array | $destination | The destination configuration, with at least a 'plugin' key. |
from Migration |
| protected MigrateDestinationInterface | $destinationPlugin | The destination plugin. |
from Migration |
| protected array | $idMap | The identifier map data. |
from Migration |
| protected MigrateIdMapInterface | $idMapPlugin | The identifier map. |
from Migration |
| protected array | $sourceIds | The source identifiers. |
from Migration |
| protected array | $destinationIds | The destination identifiers. |
from Migration |
| protected int | $sourceRowStatus | Specify value of source_row_status for current map row. Usually set by MigrateFieldHandler implementations. |
from Migration |
| protected bool | $trackLastImported | Track time of last import if TRUE. |
from Migration |
| protected array | $requirements | These migrations must be already executed before this migration can run. |
from Migration |
| protected array | $migration_tags | An optional list of tags, used by the plugin manager for filtering. |
from Migration |
| protected bool | $audit | Whether the migration is auditable. |
from Migration |
| protected array | $migration_dependencies | These migrations, if run, must be executed before this migration. |
from Migration |
| protected array | $dependencies | The migration's configuration dependencies. |
from Migration |
| protected MigrationPluginManagerInterface | $migrationPluginManager | The migration plugin manager for loading other migration plugins. |
from Migration |
| protected MigratePluginManager | $sourcePluginManager | The source plugin manager. |
from Migration |
| protected MigratePluginManager | $processPluginManager | The process plugin manager. |
from Migration |
| protected MigrateDestinationPluginManager | $destinationPluginManager | The destination plugin manager. |
from Migration |
| protected MigratePluginManager | $idMapPluginManager | The ID map plugin manager. |
from Migration |
| protected array | $statusLabels | Labels corresponding to each defined status. |
from Migration |
| protected bool | $init | Flag indicating whether the field data has been filled already. |
from FieldMigration |
| protected FieldDiscoveryInterface | $fieldDiscovery | The migration field discovery service. |
from FieldMigration |
Methods
Constructs a FieldMigration.
Translates a string to the current language or to a given language.
Formats a string containing a count of items.
Returns the number of plurals supported by a given language.
Gets the string translation service.
Creates an instance of the plugin.
Returns the process plugins.
Resolve shorthands into a list of plugin configurations.
Returns the initialized destination plugin.
Gets the migration plugin manager.
Signal that the migration should be interrupted with the specified result code.
Check if all source rows from this migration have been processed.
Get the normalized process pipeline configuration describing the process plugins.
Allows you to override the entire process configuration.
Set the process pipeline configuration for an individual destination field.
Merge the process pipeline configuration for a single property.
Set if the migration should track time of last import.
Find migration dependencies from migration_lookup and sub_process plugins.
Get the destination configuration, with at least a 'plugin' key.
Get the source configuration, with at least a 'plugin' key.
Details
__construct(array $configuration, string $plugin_id, mixed $plugin_definition, MigrationPluginManagerInterface $migration_plugin_manager, MigratePluginManagerInterface $source_plugin_manager, MigratePluginManagerInterface $process_plugin_manager, MigrateDestinationPluginManager $destination_plugin_manager, MigratePluginManagerInterface $id_map_plugin_manager, FieldDiscoveryInterface $field_discovery)
Constructs a FieldMigration.
string
getPluginId()
Gets the plugin_id of the plugin instance.
string
getBaseId()
Gets the base_plugin_id of the plugin instance.
string|null
getDerivativeId()
Gets the derivative_id of the plugin instance.
array
getPluginDefinition()
Gets the definition of the plugin implementation.
bool
isConfigurable()
Determines if the plugin is configurable.
protected TranslatableMarkup
t(string $string, array $args = [], array $options = [])
Translates a string to the current language or to a given language.
See \Drupal\Core\StringTranslation\TranslatableMarkup::__construct() for important security information and usage guidelines.
In order for strings to be localized, make them available in one of the ways supported by the
protected
formatPlural($count, $singular, $plural, array $args = [], array $options = [])
Formats a string containing a count of items.
protected
getNumberOfPlurals($langcode = NULL)
Returns the number of plurals supported by a given language.
protected TranslationInterface
getStringTranslation()
Gets the string translation service.
$this
setStringTranslation(TranslationInterface $translation)
Sets the string translation service to use.
__sleep()
{@inheritdoc}
__wakeup()
{@inheritdoc}
setMessenger(MessengerInterface $messenger)
Sets the messenger.
MessengerInterface
messenger()
Gets the messenger.
static ContainerFactoryPluginInterface
create(ContainerInterface $container, array $configuration, string $plugin_id, mixed $plugin_definition)
Creates an instance of the plugin.
string
id()
An alias for getPluginId() for backwards compatibility reasons.
string
label()
Get the plugin label.
MigrateIdMapInterface
getIdMapPlugin()
Retrieves the ID map plugin.
MigrateSourceInterface
getSourcePlugin()
Returns the initialized source plugin.
MigrateProcessInterface[][]
getProcessPlugins(array $process = NULL)
Returns the process plugins.
protected array
getProcessNormalized(array $process)
Resolve shorthands into a list of plugin configurations.
MigrateDestinationInterface
getDestinationPlugin(bool $stub_being_requested = FALSE)
Returns the initialized destination plugin.
MigrateIdMapInterface
getIdMap()
Returns the initialized id_map plugin.
array
getRequirements()
Get a list of required plugin IDs.
checkRequirements()
Checks if requirements for this plugin are OK.
protected MigrationPluginManagerInterface
getMigrationPluginManager()
Gets the migration plugin manager.
setStatus(int $status)
Set the current migration status.
int
getStatus()
Get the current migration status.
string
getStatusLabel()
Retrieve a label for the current status.
int
getInterruptionResult()
Get the result to return upon interruption.
clearInterruptionResult()
Clears the result to return upon interruption.
interruptMigration(int $result)
Signal that the migration should be interrupted with the specified result code.
bool
allRowsProcessed()
Check if all source rows from this migration have been processed.
set($property_name, $value)
{@inheritdoc}
array
getProcess()
Get the normalized process pipeline configuration describing the process plugins.
The process configuration is always normalized. All shorthand processing will be expanded into their full representations.
$this
setProcess(array $process)
Allows you to override the entire process configuration.
$this
setProcessOfProperty(string $property, mixed $process_of_property)
Set the process pipeline configuration for an individual destination field.
This method allows you to set the process pipeline configuration for a single property within the full process pipeline configuration.
$this
mergeProcessOfProperty(string $property, array $process_of_property)
Merge the process pipeline configuration for a single property.
bool
isTrackLastImported()
Checks if the migration should track time of last import.
$this
setTrackLastImported(bool $track_last_imported)
Set if the migration should track time of last import.
array
getMigrationDependencies()
Get the dependencies for this migration.
protected array
findMigrationDependencies(array $process)
Find migration dependencies from migration_lookup and sub_process plugins.
array
getDestinationConfiguration()
Get the destination configuration, with at least a 'plugin' key.
array
getSourceConfiguration()
Get the source configuration, with at least a 'plugin' key.
bool
getTrackLastImported()
If true, track time of last import.
array
getDestinationIds()
The destination identifiers.
An array of destination identifiers: the keys are the name of the properties, the values are dependent on the ID map plugin.
array
getMigrationTags()
The migration tags.
bool
isAuditable()
Indicates if the migration is auditable.