You are here

public function WineTerm::query in Migrate Plus 8.4

Same name and namespace in other branches
  1. 8.5 migrate_example_advanced/src/Plugin/migrate/source/WineTerm.php \Drupal\migrate_example_advanced\Plugin\migrate\source\WineTerm::query()
  2. 8 migrate_example_advanced/src/Plugin/migrate/source/WineTerm.php \Drupal\migrate_example_advanced\Plugin\migrate\source\WineTerm::query()
  3. 8.2 migrate_example_advanced/src/Plugin/migrate/source/WineTerm.php \Drupal\migrate_example_advanced\Plugin\migrate\source\WineTerm::query()
  4. 8.3 migrate_example_advanced/src/Plugin/migrate/source/WineTerm.php \Drupal\migrate_example_advanced\Plugin\migrate\source\WineTerm::query()

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

migrate_example_advanced/src/Plugin/migrate/source/WineTerm.php, line 19

Class

WineTerm
A SQL-based source plugin, to retrieve category data from a source database.

Namespace

Drupal\migrate_example_advanced\Plugin\migrate\source

Code

public function query() {
  $fields = [
    'categoryid',
    'type',
    'name',
    'details',
    'category_parent',
    'ordering',
  ];
  return $this
    ->select('migrate_example_advanced_categories', 'wc')
    ->fields('wc', $fields)
    ->orderBy('category_parent', 'ASC');
}