You are here

public function LibraryContentTypes::query in Library 8

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

src/Plugin/migrate/source/d6/LibraryContentTypes.php, line 19

Class

LibraryContentTypes
Drupal 6 library source.

Namespace

Drupal\library\Plugin\migrate\source\d6

Code

public function query() {
  $inner_query = $this
    ->select('node_type', 'nt');
  $inner_query
    ->addExpression('CONCAT(\'library_\',type)', 'type');
  $query = $this
    ->select('variable', 'v');
  $query
    ->addExpression('SUBSTRING(name FROM 9)', 'name');
  $query
    ->condition('value', serialize('1'), '=')
    ->condition('name', $inner_query, 'IN');
  return $query;
}