public function NodeEntityTranslation::query in Drupal 8
Same name and namespace in other branches
- 9 core/modules/node/src/Plugin/migrate/source/d7/NodeEntityTranslation.php \Drupal\node\Plugin\migrate\source\d7\NodeEntityTranslation::query()
- 10 core/modules/node/src/Plugin/migrate/source/d7/NodeEntityTranslation.php \Drupal\node\Plugin\migrate\source\d7\NodeEntityTranslation::query()
Return value
\Drupal\Core\Database\Query\SelectInterface
Overrides SqlBase::query
File
- core/
modules/ node/ src/ Plugin/ migrate/ source/ d7/ NodeEntityTranslation.php, line 21
Class
- NodeEntityTranslation
- Provides Drupal 7 node entity translations source plugin.
Namespace
Drupal\node\Plugin\migrate\source\d7Code
public function query() {
$query = $this
->select('entity_translation', 'et')
->fields('et')
->fields('n', [
'title',
'type',
'promote',
'sticky',
])
->fields('nr', [
'log',
'timestamp',
])
->condition('et.entity_type', 'node')
->condition('et.source', '', '<>');
$query
->addField('nr', 'uid', 'revision_uid');
$query
->innerJoin('node', 'n', 'n.nid = et.entity_id');
$query
->innerJoin('node_revision', 'nr', 'nr.vid = et.revision_id');
if (isset($this->configuration['node_type'])) {
$query
->condition('n.type', $this->configuration['node_type']);
}
return $query;
}