function Upload::prepareRow
Same name in other branches
- 8.9.x core/modules/file/src/Plugin/migrate/source/d6/Upload.php \Drupal\file\Plugin\migrate\source\d6\Upload::prepareRow()
- 10 core/modules/file/src/Plugin/migrate/source/d6/Upload.php \Drupal\file\Plugin\migrate\source\d6\Upload::prepareRow()
- 11.x core/modules/file/src/Plugin/migrate/source/d6/Upload.php \Drupal\file\Plugin\migrate\source\d6\Upload::prepareRow()
Overrides SourcePluginBase::prepareRow
File
-
core/
modules/ file/ src/ Plugin/ migrate/ source/ d6/ Upload.php, line 44
Class
- Upload
- Drupal 6 upload source from database.
Namespace
Drupal\file\Plugin\migrate\source\d6Code
public function prepareRow(Row $row) {
$query = $this->select('upload', 'u')
->fields('u', [
'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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.