You are here

public function Comment::query in Zircon Profile 8.0

Same name in this branch
  1. 8.0 core/modules/comment/src/Plugin/migrate/source/d6/Comment.php \Drupal\comment\Plugin\migrate\source\d6\Comment::query()
  2. 8.0 core/modules/comment/src/Plugin/migrate/source/d7/Comment.php \Drupal\comment\Plugin\migrate\source\d7\Comment::query()
Same name and namespace in other branches
  1. 8 core/modules/comment/src/Plugin/migrate/source/d6/Comment.php \Drupal\comment\Plugin\migrate\source\d6\Comment::query()

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

core/modules/comment/src/Plugin/migrate/source/d6/Comment.php, line 26
Contains \Drupal\comment\Plugin\migrate\source\d6\Comment.

Class

Comment
Drupal 6 comment source from database.

Namespace

Drupal\comment\Plugin\migrate\source\d6

Code

public function query() {
  $query = $this
    ->select('comments', 'c')
    ->fields('c', array(
    'cid',
    'pid',
    'nid',
    'uid',
    'subject',
    'comment',
    'hostname',
    'timestamp',
    'status',
    'thread',
    'name',
    'mail',
    'homepage',
    'format',
  ));
  $query
    ->innerJoin('node', 'n', 'c.nid = n.nid');
  $query
    ->fields('n', array(
    'type',
  ));
  $query
    ->orderBy('c.timestamp');
  return $query;
}