function Comment::query

Same name in this branch
  1. 11.x core/modules/comment/src/Plugin/migrate/source/d6/Comment.php \Drupal\comment\Plugin\migrate\source\d6\Comment::query()
Same name in other branches
  1. 9 core/modules/comment/src/Plugin/migrate/source/d6/Comment.php \Drupal\comment\Plugin\migrate\source\d6\Comment::query()
  2. 9 core/modules/comment/src/Plugin/migrate/source/d7/Comment.php \Drupal\comment\Plugin\migrate\source\d7\Comment::query()
  3. 8.9.x core/modules/comment/src/Plugin/migrate/source/d6/Comment.php \Drupal\comment\Plugin\migrate\source\d6\Comment::query()
  4. 8.9.x core/modules/comment/src/Plugin/migrate/source/d7/Comment.php \Drupal\comment\Plugin\migrate\source\d7\Comment::query()
  5. 10 core/modules/comment/src/Plugin/migrate/source/d6/Comment.php \Drupal\comment\Plugin\migrate\source\d6\Comment::query()
  6. 10 core/modules/comment/src/Plugin/migrate/source/d7/Comment.php \Drupal\comment\Plugin\migrate\source\d7\Comment::query()

Overrides SqlBase::query

File

core/modules/comment/src/Plugin/migrate/source/d7/Comment.php, line 28

Class

Comment
Drupal 7 comment source from database.

Namespace

Drupal\comment\Plugin\migrate\source\d7

Code

public function query() {
    $query = $this->select('comment', 'c')
        ->fields('c');
    $query->innerJoin('node', 'n', '[c].[nid] = [n].[nid]');
    $query->addField('n', 'type', 'node_type');
    $query->orderBy('c.created');
    return $query;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.