You are here

public function D7FlagListItems::query in Flag Lists 4.0.x

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

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

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

Class

D7FlagListItems
Minimalistic example for a SqlBase source plugin.

Namespace

Drupal\flag_lists\Plugin\migrate\source

Code

public function query() {

  // Source data is queried from 'curling_games' table.
  $query = $this
    ->select('flag_lists_content', 'c');
  $query
    ->join('flag_lists_flags', 'f', 'c.fid = f.fid');
  $query
    ->fields('c', [
    'fcid',
    'fid',
    'entity_type',
    'entity_id',
    'uid',
    'sid',
    'timestamp',
  ])
    ->fields('f', [
    'name',
    'title',
  ]);
  return $query;
}