You are here

public function WineTerm::fields in Migrate Plus 8

Same name and namespace in other branches
  1. 8.5 migrate_example_advanced/src/Plugin/migrate/source/WineTerm.php \Drupal\migrate_example_advanced\Plugin\migrate\source\WineTerm::fields()
  2. 8.2 migrate_example_advanced/src/Plugin/migrate/source/WineTerm.php \Drupal\migrate_example_advanced\Plugin\migrate\source\WineTerm::fields()
  3. 8.3 migrate_example_advanced/src/Plugin/migrate/source/WineTerm.php \Drupal\migrate_example_advanced\Plugin\migrate\source\WineTerm::fields()
  4. 8.4 migrate_example_advanced/src/Plugin/migrate/source/WineTerm.php \Drupal\migrate_example_advanced\Plugin\migrate\source\WineTerm::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_advanced/src/Plugin/migrate/source/WineTerm.php, line 35
Contains \Drupal\migrate_example_advanced\Plugin\migrate\source\WineTerm.

Class

WineTerm
A straight-forward SQL-based source plugin, to retrieve category data from the source database.

Namespace

Drupal\migrate_example_advanced\Plugin\migrate\source

Code

public function fields() {
  $fields = [
    'categoryid' => $this
      ->t('Unique ID of the category'),
    'type' => $this
      ->t('Category type corresponding to Drupal vocabularies'),
    'name' => $this
      ->t('Category name'),
    'details' => $this
      ->t('Description of the category'),
    'category_parent' => $this
      ->t('ID of the parent category'),
    'ordering' => $this
      ->t('Order in which to display this category'),
  ];
  return $fields;
}