Same name in this branch
  1. 10 core/modules/node/src/Plugin/migrate/source/d6/NodeType.php \Drupal\node\Plugin\migrate\source\d6\NodeType::getCommentFields()
  2. 10 core/modules/node/src/Plugin/migrate/source/d7/NodeType.php \Drupal\node\Plugin\migrate\source\d7\NodeType::getCommentFields()
Same name and namespace in other branches
  1. 8.9.x core/modules/node/src/Plugin/migrate/source/d7/NodeType.php \Drupal\node\Plugin\migrate\source\d7\NodeType::getCommentFields()
  2. 9 core/modules/node/src/Plugin/migrate/source/d7/NodeType.php \Drupal\node\Plugin\migrate\source\d7\NodeType::getCommentFields()

Returns the fields containing comment settings for each node type.

Return value

string[] An associative array of field descriptions, keyed by field.

2 calls to NodeType::getCommentFields()
NodeType::fields in core/modules/node/src/Plugin/migrate/source/d7/NodeType.php
Returns available fields on the source.
NodeType::prepareRow in core/modules/node/src/Plugin/migrate/source/d7/NodeType.php
Adds additional data to the row.

File

core/modules/node/src/Plugin/migrate/source/d7/NodeType.php, line 74

Class

NodeType
Drupal 7 Node types source from database.

Namespace

Drupal\node\Plugin\migrate\source\d7

Code

protected function getCommentFields() {
  return [
    'comment' => $this
      ->t('Default comment setting'),
    'comment_default_mode' => $this
      ->t('Default display mode'),
    'comment_default_per_page' => $this
      ->t('Default comments per page'),
    'comment_anonymous' => $this
      ->t('Anonymous commenting'),
    'comment_subject_field' => $this
      ->t('Comment subject field'),
    'comment_preview' => $this
      ->t('Preview comment'),
    'comment_form_location' => $this
      ->t('Location of comment submission form'),
  ];
}