diff --git a/core/modules/user/migration_templates/d6_user.yml b/core/modules/user/migration_templates/d6_user.yml index 05ff4a00e5e16401b7a557fcbe67c30ae61d9d69..00dba32e6f7a8f5481a8c98989c6f55b6f7aa384 100644 --- a/core/modules/user/migration_templates/d6_user.yml +++ b/core/modules/user/migration_templates/d6_user.yml @@ -23,7 +23,8 @@ process: migration: d6_user_role source: roles user_picture: - plugin: d6_user_picture + plugin: migration + migration: d6_user_picture_file source: uid destination: plugin: entity:user @@ -33,5 +34,5 @@ migration_dependencies: - d6_user_role optional: - d6_user_picture_file - - d6_user_picture_entity_display - - d6_user_picture_entity_form_display + - user_picture_entity_display + - user_picture_entity_form_display diff --git a/core/modules/user/migration_templates/d7_user.yml b/core/modules/user/migration_templates/d7_user.yml index 6dfe270569a2c3fb7380e92a83d65694d18adf42..6dbbde9e0d8108f02020df97e07b5e1582f81636 100755 --- a/core/modules/user/migration_templates/d7_user.yml +++ b/core/modules/user/migration_templates/d7_user.yml @@ -24,7 +24,10 @@ process: plugin: migration migration: d7_user_role source: roles - user_picture: picture + user_picture: + plugin: migration + migration: d7_file + source: picture destination: plugin: entity:user migration_dependencies: diff --git a/core/modules/user/src/Plugin/migrate/process/d6/UserPicture.php b/core/modules/user/src/Plugin/migrate/process/d6/UserPicture.php deleted file mode 100644 index 8438092bc9a6af54a48c5aff1635d2ce18565823..0000000000000000000000000000000000000000 --- a/core/modules/user/src/Plugin/migrate/process/d6/UserPicture.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -/** - * @file - * Contains \Drupal\user\Plugin\migrate\process\d6\UserPicture. - */ - -namespace Drupal\user\Plugin\migrate\process\d6; - -use Drupal\Core\Plugin\ContainerFactoryPluginInterface; -use Drupal\migrate\Entity\MigrationInterface; -use Drupal\migrate\MigrateExecutableInterface; -use Drupal\migrate\Plugin\MigrateProcessInterface; -use Drupal\migrate\ProcessPluginBase; -use Drupal\migrate\Row; -use Symfony\Component\DependencyInjection\ContainerInterface; - -/** - * The user picture process plugin. - * - * @MigrateProcessPlugin( - * id = "d6_user_picture" - * ) - */ -class UserPicture extends ProcessPluginBase implements ContainerFactoryPluginInterface { - - /** - * The migration plugin. - * - * @var \Drupal\migrate\Plugin\MigrateProcessInterface - */ - protected $migrationPlugin; - - /** - * {@inheritdoc} - */ - public function __construct(array $configuration, $plugin_id, array $plugin_definition, MigrationInterface $migration, MigrateProcessInterface $migration_plugin) { - parent::__construct($configuration, $plugin_id, $plugin_definition); - $this->migration = $migration; - $this->migrationPlugin = $migration_plugin; - } - - /** - * {@inheritdoc} - */ - public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) { - return new static( - $configuration, - $plugin_id, - $plugin_definition, - $migration, - $container->get('plugin.manager.migrate.process')->createInstance('migration', array('migration' => 'd6_user_picture_file'), $migration) - ); - } - - /** - * {@inheritdoc} - */ - public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) { - return $row->getSourceProperty('picture') ? $this->migrationPlugin->transform($value, $migrate_executable, $row, $destination_property) : NULL; - } - -}