You are here

public function MigrateExternalTranslatedTestSource::fields in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/modules/migrate_external_translated_test/src/Plugin/migrate/source/MigrateExternalTranslatedTestSource.php \Drupal\migrate_external_translated_test\Plugin\migrate\source\MigrateExternalTranslatedTestSource::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

core/modules/migrate/tests/modules/migrate_external_translated_test/src/Plugin/migrate/source/MigrateExternalTranslatedTestSource.php, line 34

Class

MigrateExternalTranslatedTestSource
A simple migrate source for our tests.

Namespace

Drupal\migrate_external_translated_test\Plugin\migrate\source

Code

public function fields() {
  return [
    'name' => $this
      ->t('Unique name'),
    'title' => $this
      ->t('Title'),
    'lang' => $this
      ->t('Language'),
  ];
}