public function Comment::query in Drupal 10
Same name in this branch
- 10 core/modules/comment/src/Plugin/migrate/source/d6/Comment.php \Drupal\comment\Plugin\migrate\source\d6\Comment::query()
- 10 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
- 8 core/modules/comment/src/Plugin/migrate/source/d7/Comment.php \Drupal\comment\Plugin\migrate\source\d7\Comment::query()
- 9 core/modules/comment/src/Plugin/migrate/source/d7/Comment.php \Drupal\comment\Plugin\migrate\source\d7\Comment::query()
Return value
\Drupal\Core\Database\Query\SelectInterface
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\d7Code
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;
}