You are here

public function BeerUser::fields in Migrate Plus 8

Same name and namespace in other branches
  1. 8.5 migrate_example/src/Plugin/migrate/source/BeerUser.php \Drupal\migrate_example\Plugin\migrate\source\BeerUser::fields()
  2. 8.2 migrate_example/src/Plugin/migrate/source/BeerUser.php \Drupal\migrate_example\Plugin\migrate\source\BeerUser::fields()
  3. 8.3 migrate_example/src/Plugin/migrate/source/BeerUser.php \Drupal\migrate_example\Plugin\migrate\source\BeerUser::fields()
  4. 8.4 migrate_example/src/Plugin/migrate/source/BeerUser.php \Drupal\migrate_example\Plugin\migrate\source\BeerUser::fields()

Returns available fields on the source.

Return value

array Available fields in the source, keys are the field machine names as used in field mappings, values are descriptions.

Overrides MigrateSourceInterface::fields

File

migrate_example/src/Plugin/migrate/source/BeerUser.php, line 34
Contains \Drupal\migrate_example\Plugin\migrate\source\BeerUser.

Class

BeerUser
Source plugin for beer user accounts.

Namespace

Drupal\migrate_example\Plugin\migrate\source

Code

public function fields() {
  $fields = [
    'aid' => $this
      ->t('Account ID'),
    'status' => $this
      ->t('Blocked/Allowed'),
    'registered' => $this
      ->t('Registered date'),
    'username' => $this
      ->t('Account name (for login)'),
    'nickname' => $this
      ->t('Account name (for display)'),
    'password' => $this
      ->t('Account password (raw)'),
    'email' => $this
      ->t('Account email'),
    'sex' => $this
      ->t('Gender'),
    'beers' => $this
      ->t('Favorite beers, pipe-separated'),
  ];
  return $fields;
}