You are here

public function PhotosImage::query in Album Photos 6.0.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/migrate/source/PhotosImage.php \Drupal\photos\Plugin\migrate\source\PhotosImage::query()
  2. 8.4 src/Plugin/migrate/source/PhotosImage.php \Drupal\photos\Plugin\migrate\source\PhotosImage::query()

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

src/Plugin/migrate/source/PhotosImage.php, line 20

Class

PhotosImage
Source plugin for photos image content.

Namespace

Drupal\photos\Plugin\migrate\source

Code

public function query() {
  $query = $this
    ->select('photos_image', 'i');
  $query
    ->join('file_managed', 'f', 'f.fid = i.fid');
  $query
    ->fields('i', [
    'fid',
    'pid',
    'title',
    'des',
    'wid',
    'count',
    'comcount',
  ])
    ->fields('f', [
    'uid',
  ]);
  return $query;
}