You are here

public function DisqusComment::fields in Disqus 8

Same name in this branch
  1. 8 src/Plugin/migrate/source/DisqusComment.php \Drupal\disqus\Plugin\migrate\source\DisqusComment::fields()
  2. 8 src/Plugin/migrate/destination/DisqusComment.php \Drupal\disqus\Plugin\migrate\destination\DisqusComment::fields()

Returns an array of destination fields.

Derived classes must implement fields(), returning a list of available destination fields.

Parameters

\Drupal\migrate\Plugin\MigrationInterface $migration: Unused, will be removed before Drupal 9.0.x. Defaults to NULL.

Return value

array

  • Keys: machine names of the fields
  • Values: Human-friendly descriptions of the fields.

Overrides MigrateDestinationInterface::fields

File

src/Plugin/migrate/destination/DisqusComment.php, line 74

Class

DisqusComment
Disqus comment destination.

Namespace

Drupal\disqus\Plugin\migrate\destination

Code

public function fields(MigrationInterface $migration = NULL) {
  return [
    'disqus_id' => $this
      ->t('The disqus ID'),
    'message' => $this
      ->t('The comment body.'),
    'parent' => $this
      ->t('Parent comment ID. If set to null, this comment is not a reply to an existing comment.'),
    'identifier' => $this
      ->t('The disqus identifier to look up the correct thread.'),
    'title' => $this
      ->t("The title of the comment's thread page."),
    'author_email' => $this
      ->t("The comments author's email."),
    'author_name' => $this
      ->t("The comments author's name."),
    'author_url' => $this
      ->t("The comments author's url."),
    'date' => $this
      ->t('The time that the comment was posted as a Unix timestamp.'),
    'ip_address' => $this
      ->t("The IP address that the comment was posted from."),
  ];
}