You are here

public function D7WebformSubmission::prepareRow in Webform: Migrate 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/migrate/source/d7/D7WebformSubmission.php \Drupal\webform_migrate\Plugin\migrate\source\d7\D7WebformSubmission::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

src/Plugin/migrate/source/d7/D7WebformSubmission.php, line 59

Class

D7WebformSubmission
Drupal 7 webform submission source from database.

Namespace

Drupal\webform_migrate\Plugin\migrate\source\d7

Code

public function prepareRow(Row $row) {
  $nid = $row
    ->getSourceProperty('nid');
  $sid = $row
    ->getSourceProperty('sid');
  $submitted_data = $this
    ->buildSubmittedData($sid);
  $row
    ->setSourceProperty('webform_id', 'webform_' . $nid);
  $row
    ->setSourceProperty('webform_data', $submitted_data);
  $row
    ->setSourceProperty('webform_uri', '/node/' . $nid);
  return parent::prepareRow($row);
}