public function ParagraphsType::prepareRow in Paragraphs 8
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
- src/
Plugin/ migrate/ source/ d7/ ParagraphsType.php, line 44
Class
- ParagraphsType
- Paragraphs Type source plugin.
Namespace
Drupal\paragraphs\Plugin\migrate\source\d7Code
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);
}