function CommentType::prepareRow

Overrides SourcePluginBase::prepareRow

File

core/modules/comment/src/Plugin/migrate/source/CommentType.php, line 35

Class

CommentType
Drupal 6/7 comment types source from database.

Namespace

Drupal\comment\Plugin\migrate\source

Code

public function prepareRow(Row $row) {
  $node_type = $row->getSourceProperty('type');
  foreach (array_keys($this->getCommentFields()) as $field) {
    $row->setSourceProperty($field, $this->variableGet($field . '_' . $node_type, NULL));
  }
  return parent::prepareRow($row);
}

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