public function CommentEntityTranslation::query in Drupal 8
Same name and namespace in other branches
- 9 core/modules/comment/src/Plugin/migrate/source/d7/CommentEntityTranslation.php \Drupal\comment\Plugin\migrate\source\d7\CommentEntityTranslation::query()
 - 10 core/modules/comment/src/Plugin/migrate/source/d7/CommentEntityTranslation.php \Drupal\comment\Plugin\migrate\source\d7\CommentEntityTranslation::query()
 
Return value
\Drupal\Core\Database\Query\SelectInterface
Overrides SqlBase::query
File
- core/
modules/ comment/ src/ Plugin/ migrate/ source/ d7/ CommentEntityTranslation.php, line 21  
Class
- CommentEntityTranslation
 - Provides Drupal 7 comment entity translation source plugin.
 
Namespace
Drupal\comment\Plugin\migrate\source\d7Code
public function query() {
  $query = $this
    ->select('entity_translation', 'et')
    ->fields('et')
    ->fields('c', [
    'subject',
  ])
    ->condition('et.entity_type', 'comment')
    ->condition('et.source', '', '<>');
  $query
    ->innerJoin('comment', 'c', 'c.cid = et.entity_id');
  $query
    ->innerJoin('node', 'n', 'n.nid = c.nid');
  $query
    ->addField('n', 'type', 'node_type');
  $query
    ->orderBy('et.created');
  return $query;
}