You are here

public function Node::prepareRow in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node::prepareRow()
  2. 8 core/modules/node/src/Plugin/migrate/source/d7/Node.php \Drupal\node\Plugin\migrate\source\d7\Node::prepareRow()
Same name and namespace in other branches
  1. 8.0 core/modules/node/src/Plugin/migrate/source/d7/Node.php \Drupal\node\Plugin\migrate\source\d7\Node::prepareRow()

Add 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/node/src/Plugin/migrate/source/d7/Node.php, line 67
Contains \Drupal\node\Plugin\migrate\source\d7\Node.

Class

Node
Drupal 7 node source from database.

Namespace

Drupal\node\Plugin\migrate\source\d7

Code

public function prepareRow(Row $row) {

  // Get Field API field values.
  foreach (array_keys($this
    ->getFields('node', $row
    ->getSourceProperty('type'))) as $field) {
    $nid = $row
      ->getSourceProperty('nid');
    $vid = $row
      ->getSourceProperty('vid');
    $row
      ->setSourceProperty($field, $this
      ->getFieldValues('node', $field, $nid, $vid));
  }
  return parent::prepareRow($row);
}