public function NodeEntityTranslation::query in Drupal 10
Same name and namespace in other branches
- 8 core/modules/node/src/Plugin/migrate/source/d7/NodeEntityTranslation.php \Drupal\node\Plugin\migrate\source\d7\NodeEntityTranslation::query()
- 9 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 49
Class
- NodeEntityTranslation
- Drupal 7 node entity translations source from database.
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', (array) $this->configuration['node_type'], 'IN');
}
return $query;
}