You are here

public function Log::query in Log entity 2.x

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

src/Plugin/migrate/source/d7/Log.php, line 21

Class

Log
Log source from database.

Namespace

Drupal\log\Plugin\migrate\source\d7

Code

public function query() {
  $query = $this
    ->select('log', 'l')
    ->fields('l')
    ->distinct()
    ->orderBy('id');
  if (isset($this->configuration['bundle'])) {
    $query
      ->condition('l.type', (array) $this->configuration['bundle'], 'IN');
  }
  return $query;
}