Same name and namespace in other branches
  1. 9 core/modules/comment/src/Plugin/migrate/source/CommentType.php \Drupal\comment\Plugin\migrate\source\CommentType::prepareRow()

Adds additional data to the row.

Parameters

\Drupal\migrate\Row $row: The row object.

Return value

bool FALSE if this row needs to be skipped.

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);
}