You are here

public function Config::query in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate_drupal/src/Plugin/migrate/source/d8/Config.php \Drupal\migrate_drupal\Plugin\migrate\source\d8\Config::query()
  2. 9 core/modules/migrate_drupal/src/Plugin/migrate/source/d8/Config.php \Drupal\migrate_drupal\Plugin\migrate\source\d8\Config::query()

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

core/modules/migrate_drupal/src/Plugin/migrate/source/d8/Config.php, line 60

Class

Config
Drupal 8+ configuration source from database.

Namespace

Drupal\migrate_drupal\Plugin\migrate\source\d8

Code

public function query() {
  $query = $this
    ->select('config', 'c')
    ->fields('c', [
    'collection',
    'name',
    'data',
  ]);
  if (!empty($this->configuration['collections'])) {
    $query
      ->condition('collection', (array) $this->configuration['collections'], 'IN');
  }
  if (!empty($this->configuration['names'])) {
    $query
      ->condition('name', (array) $this->configuration['names'], 'IN');
  }
  return $query;
}