You are here

public function Upload::prepareRow in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/file/src/Plugin/migrate/source/d6/Upload.php \Drupal\file\Plugin\migrate\source\d6\Upload::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/file/src/Plugin/migrate/source/d6/Upload.php, line 43
Contains \Drupal\file\Plugin\migrate\source\d6\Upload.

Class

Upload
Drupal 6 upload source from database.

Namespace

Drupal\file\Plugin\migrate\source\d6

Code

public function prepareRow(Row $row) {
  $query = $this
    ->select('upload', 'u')
    ->fields('u', array(
    'fid',
    'description',
    'list',
  ))
    ->condition('u.nid', $row
    ->getSourceProperty('nid'))
    ->orderBy('u.weight');
  $query
    ->innerJoin('node', 'n', static::JOIN);
  $row
    ->setSourceProperty('upload', $query
    ->execute()
    ->fetchAll());
  return parent::prepareRow($row);
}