You are here

public function D7FlaggingCollections::query in Flag Lists 8

Same name and namespace in other branches
  1. 4.0.x src/Plugin/migrate/source/D7FlaggingCollections.php \Drupal\flag_lists\Plugin\migrate\source\D7FlaggingCollections::query()

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

src/Plugin/migrate/source/D7FlaggingCollections.php, line 22

Class

D7FlaggingCollections
Minimalistic example for a SqlBase source plugin.

Namespace

Drupal\flag_lists\Plugin\migrate\source

Code

public function query() {

  // Source data is queried from 'flag_lists_flags' table.
  $query = $this
    ->select('flag_lists_flags', 'c');
  $query
    ->join('flag', 'f', 'c.pfid = f.fid');
  $query
    ->fields('c', [
    'fid',
    'pfid',
    'uid',
    'entity_type',
    'title',
    'options',
  ])
    ->fields('f', [
    'name',
  ]);
  return $query;
}