Same name and namespace in other branches
  1. 8.9.x core/modules/file/src/Plugin/migrate/source/d6/Upload.php \Drupal\file\Plugin\migrate\source\d6\Upload::query()
  2. 9 core/modules/file/src/Plugin/migrate/source/d6/Upload.php \Drupal\file\Plugin\migrate\source\d6\Upload::query()

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

core/modules/file/src/Plugin/migrate/source/d6/Upload.php, line 31

Class

Upload
Drupal 6 upload source from database.

Namespace

Drupal\file\Plugin\migrate\source\d6

Code

public function query() {
  $query = $this
    ->select('upload', 'u')
    ->distinct()
    ->fields('u', [
    'nid',
    'vid',
  ]);
  $query
    ->innerJoin('node', 'n', static::JOIN);
  $query
    ->addField('n', 'type');
  $query
    ->addField('n', 'language');
  return $query;
}