You are here

class User in Drupal 10

Same name in this branch
  1. 10 core/modules/user/src/Entity/User.php \Drupal\user\Entity\User
  2. 10 core/modules/user/src/Plugin/migrate/User.php \Drupal\user\Plugin\migrate\User
  3. 10 core/modules/user/src/Plugin/views/argument_default/User.php \Drupal\user\Plugin\views\argument_default\User
  4. 10 core/modules/user/src/Plugin/views/argument_validator/User.php \Drupal\user\Plugin\views\argument_validator\User
  5. 10 core/modules/user/src/Plugin/migrate/source/d6/User.php \Drupal\user\Plugin\migrate\source\d6\User
  6. 10 core/modules/user/src/Plugin/migrate/source/d7/User.php \Drupal\user\Plugin\migrate\source\d7\User
Same name and namespace in other branches
  1. 8 core/modules/user/src/Plugin/migrate/User.php \Drupal\user\Plugin\migrate\User
  2. 9 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\user\Plugin\migrate\User extends \Drupal\migrate_drupal\Plugin\migrate\FieldMigration

Expanded class hierarchy of User

33 string references to 'User'
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().
ContentModerationState::baseFieldDefinitions in core/modules/content_moderation/src/Entity/ContentModerationState.php
ContextPluginTest::testContext in core/tests/Drupal/KernelTests/Core/Plugin/ContextPluginTest.php
Tests basic context definition and value getters and setters.

... See full list

File

core/modules/user/src/Plugin/migrate/User.php, line 11

Namespace

Drupal\user\Plugin\migrate
View 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