public function BeerTerm::fields in Migrate Plus 8
Same name and namespace in other branches
- 8.5 migrate_example/src/Plugin/migrate/source/BeerTerm.php \Drupal\migrate_example\Plugin\migrate\source\BeerTerm::fields()
- 8.2 migrate_example/src/Plugin/migrate/source/BeerTerm.php \Drupal\migrate_example\Plugin\migrate\source\BeerTerm::fields()
- 8.3 migrate_example/src/Plugin/migrate/source/BeerTerm.php \Drupal\migrate_example\Plugin\migrate\source\BeerTerm::fields()
- 8.4 migrate_example/src/Plugin/migrate/source/BeerTerm.php \Drupal\migrate_example\Plugin\migrate\source\BeerTerm::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/ BeerTerm.php, line 50 - Contains \Drupal\migrate_example\Plugin\migrate\source\BeerTerm.
Class
- BeerTerm
- This is an example of a simple SQL-based source plugin. Source plugins are classes which deliver source data to the processing pipeline. For SQL sources, the SqlBase class provides most of the functionality needed - for a specific migration, you are…
Namespace
Drupal\migrate_example\Plugin\migrate\sourceCode
public function fields() {
/**
* This method simply documents the available source fields provided by
* the source plugin, for use by front-end tools. It returns an array keyed
* by field/column name, with the value being a translated string explaining
* to humans what the field represents. You should always
*/
$fields = [
'style' => $this
->t('Account ID'),
'details' => $this
->t('Blocked/Allowed'),
'style_parent' => $this
->t('Registered date'),
// These values are not currently migrated - it's OK to skip fields you
// don't need.
'region' => $this
->t('Region the style is associated with'),
'hoppiness' => $this
->t('Hoppiness of the style'),
];
return $fields;
}