function CommentVariable::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 CommentVariable::fields()
CommentVariablePerCommentType::fields in core/modules/comment/src/Plugin/migrate/source/d6/CommentVariablePerCommentType.php
Returns available fields on the source.

File

core/modules/comment/src/Plugin/migrate/source/d6/CommentVariable.php, line 82

Class

CommentVariable
Plugin annotation @MigrateSource( id = "d6_comment_variable", source_module = "comment" )

Namespace

Drupal\comment\Plugin\migrate\source\d6

Code

public function fields() {
  return $this->commentPrefixes() + [
    'node_type' => $this->t('The node type'),
    'comment_type' => $this->t('The comment type'),
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.