function CommentEntityTranslation::query
Same name in other branches
- 9 core/modules/comment/src/Plugin/migrate/source/d7/CommentEntityTranslation.php \Drupal\comment\Plugin\migrate\source\d7\CommentEntityTranslation::query()
- 8.9.x core/modules/comment/src/Plugin/migrate/source/d7/CommentEntityTranslation.php \Drupal\comment\Plugin\migrate\source\d7\CommentEntityTranslation::query()
- 11.x core/modules/comment/src/Plugin/migrate/source/d7/CommentEntityTranslation.php \Drupal\comment\Plugin\migrate\source\d7\CommentEntityTranslation::query()
Overrides SqlBase::query
File
-
core/
modules/ comment/ src/ Plugin/ migrate/ source/ d7/ CommentEntityTranslation.php, line 27
Class
- CommentEntityTranslation
- 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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.