public function ParagraphsType::prepareRow

File

paragraphs/src/Plugin/migrate/source/d7/ParagraphsType.php, line 44

Class

ParagraphsType
Paragraphs Type source plugin.

Namespace

Drupal\paragraphs\Plugin\migrate\source\d7

Code

public function prepareRow(Row $row) {

  // Paragraph bundles did not have descriptions in d7, optionally add one.
  if ($this->configuration['add_description']) {
    $name = $row
      ->getSourceProperty('name');
    $row
      ->setSourceProperty('description', 'Migrated from paragraph bundle ' . $name);
  }
  else {
    $row
      ->setSourceProperty('description', '');
  }
  return parent::prepareRow($row);
}