You are here

public function BeerComment::fields in Migrate Plus 8.5

Same name and namespace in other branches
  1. 8 migrate_example/src/Plugin/migrate/source/BeerComment.php \Drupal\migrate_example\Plugin\migrate\source\BeerComment::fields()
  2. 8.2 migrate_example/src/Plugin/migrate/source/BeerComment.php \Drupal\migrate_example\Plugin\migrate\source\BeerComment::fields()
  3. 8.3 migrate_example/src/Plugin/migrate/source/BeerComment.php \Drupal\migrate_example\Plugin\migrate\source\BeerComment::fields()
  4. 8.4 migrate_example/src/Plugin/migrate/source/BeerComment.php \Drupal\migrate_example\Plugin\migrate\source\BeerComment::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/BeerComment.php, line 39

Class

BeerComment
Source plugin for beer comments.

Namespace

Drupal\migrate_example\Plugin\migrate\source

Code

public function fields() {
  $fields = [
    'cid' => $this
      ->t('Comment ID'),
    'cid_parent' => $this
      ->t('Parent comment ID in case of comment replies'),
    'name' => $this
      ->t('Comment name (if anon)'),
    'mail' => $this
      ->t('Comment email (if anon)'),
    'aid' => $this
      ->t('Account ID (if any)'),
    'bid' => $this
      ->t('Beer ID that is being commented upon'),
    'subject' => $this
      ->t('Comment subject'),
  ];
  return $fields;
}