Same name in this branch
  1. 10 core/modules/node/src/Plugin/migrate/source/d6/NodeType.php \Drupal\node\Plugin\migrate\source\d6\NodeType::fields()
  2. 10 core/modules/node/src/Plugin/migrate/source/d7/NodeType.php \Drupal\node\Plugin\migrate\source\d7\NodeType::fields()
Same name and namespace in other branches
  1. 8.9.x core/modules/node/src/Plugin/migrate/source/d6/NodeType.php \Drupal\node\Plugin\migrate\source\d6\NodeType::fields()
  2. 9 core/modules/node/src/Plugin/migrate/source/d6/NodeType.php \Drupal\node\Plugin\migrate\source\d6\NodeType::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/node/src/Plugin/migrate/source/d6/NodeType.php, line 70

Class

NodeType
Drupal 6 Node types source from database.

Namespace

Drupal\node\Plugin\migrate\source\d6

Code

public function fields() {
  $fields = [
    'type' => $this
      ->t('Machine name of the node type.'),
    'name' => $this
      ->t('Human name of the node type.'),
    'module' => $this
      ->t('The module providing the node type.'),
    'description' => $this
      ->t('Description of the node type.'),
    'help' => $this
      ->t('Help text for the node type.'),
    'title_label' => $this
      ->t('Title label.'),
    'has_body' => $this
      ->t('Flag indicating the node type has a body field.'),
    'body_label' => $this
      ->t('Body label.'),
    'min_word_count' => $this
      ->t('Minimum word count for the body field.'),
    'custom' => $this
      ->t('Flag.'),
    'modified' => $this
      ->t('Flag.'),
    'locked' => $this
      ->t('Flag.'),
    'orig_type' => $this
      ->t('The original type.'),
    'teaser_length' => $this
      ->t('Teaser length'),
  ];
  if ($this
    ->moduleExists('comment')) {
    $fields += $this
      ->getCommentFields();
  }
  return $fields;
}