You are here

public function Term::fields in Drupal 10

Same name in this branch
  1. 10 core/modules/taxonomy/src/Plugin/migrate/source/d6/Term.php \Drupal\taxonomy\Plugin\migrate\source\d6\Term::fields()
  2. 10 core/modules/taxonomy/src/Plugin/migrate/source/d7/Term.php \Drupal\taxonomy\Plugin\migrate\source\d7\Term::fields()
Same name and namespace in other branches
  1. 8 core/modules/taxonomy/src/Plugin/migrate/source/d6/Term.php \Drupal\taxonomy\Plugin\migrate\source\d6\Term::fields()
  2. 9 core/modules/taxonomy/src/Plugin/migrate/source/d6/Term.php \Drupal\taxonomy\Plugin\migrate\source\d6\Term::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

1 method overrides Term::fields()
TermLocalizedTranslation::fields in core/modules/taxonomy/src/Plugin/migrate/source/d6/TermLocalizedTranslation.php
Returns available fields on the source.

File

core/modules/taxonomy/src/Plugin/migrate/source/d6/Term.php, line 69

Class

Term
Drupal 6 taxonomy term source from database.

Namespace

Drupal\taxonomy\Plugin\migrate\source\d6

Code

public function fields() {
  $fields = [
    'tid' => $this
      ->t('The term ID.'),
    'vid' => $this
      ->t('Existing term VID'),
    'name' => $this
      ->t('The name of the term.'),
    'description' => $this
      ->t('The term description.'),
    'weight' => $this
      ->t('Weight'),
    'parent' => $this
      ->t("The Drupal term IDs of the term's parents."),
  ];
  if (isset($this->configuration['translations'])) {
    $fields['language'] = $this
      ->t('The term language.');
    $fields['trid'] = $this
      ->t('Translation ID.');
  }
  return $fields;
}