You are here

public function Comment::fields in Drupal 10

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

Class

Comment
Drupal 6 comment source from database.

Namespace

Drupal\comment\Plugin\migrate\source\d6

Code

public function fields() {
  return [
    'cid' => $this
      ->t('Comment ID.'),
    'pid' => $this
      ->t('Parent comment ID. If set to 0, this comment is not a reply to an existing comment.'),
    'nid' => $this
      ->t('The {node}.nid to which this comment is a reply.'),
    'uid' => $this
      ->t('The {users}.uid who authored the comment. If set to 0, this comment was created by an anonymous user.'),
    'subject' => $this
      ->t('The comment title.'),
    'comment' => $this
      ->t('The comment body.'),
    'hostname' => $this
      ->t("The author's host name."),
    'timestamp' => $this
      ->t('The time that the comment was created, or last edited by its author, as a Unix timestamp.'),
    'status' => $this
      ->t('The published status of a comment. (0 = Published, 1 = Not Published)'),
    'format' => $this
      ->t('The {filter_formats}.format of the comment body.'),
    'thread' => $this
      ->t("The vancode representation of the comment's place in a thread."),
    'name' => $this
      ->t("The comment author's name. Uses {users}.name if the user is logged in, otherwise uses the value typed into the comment form."),
    'mail' => $this
      ->t("The comment author's email address from the comment form, if user is anonymous, and the 'Anonymous users may/must leave their contact information' setting is turned on."),
    'homepage' => $this
      ->t("The comment author's home page address from the comment form, if user is anonymous, and the 'Anonymous users may/must leave their contact information' setting is turned on."),
    'type' => $this
      ->t("The {node}.type to which this comment is a reply."),
    'language' => $this
      ->t("The {node}.language to which this comment is a reply. Site default language is used as a fallback if node does not have a language."),
  ];
}