You are here

public function Upload::query in Drupal 9

Same name and namespace in other branches
  1. 8 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 26

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;
}