public function Node::query in Zircon Profile 8
Same name in this branch
- 8 core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node::query()
- 8 core/modules/node/src/Plugin/migrate/source/d7/Node.php \Drupal\node\Plugin\migrate\source\d7\Node::query()
Same name and namespace in other branches
- 8.0 core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node::query()
Return value
\Drupal\Core\Database\Query\SelectInterface
Overrides SqlBase::query
File
- core/
modules/ node/ src/ Plugin/ migrate/ source/ d6/ Node.php, line 44 - Contains \Drupal\node\Plugin\migrate\source\d6\Node.
Class
- Node
- Drupal 6 node source from database.
Namespace
Drupal\node\Plugin\migrate\source\d6Code
public function query() {
// Select node in its last revision.
$query = $this
->select('node_revisions', 'nr')
->fields('n', array(
'nid',
'type',
'language',
'status',
'created',
'changed',
'comment',
'promote',
'moderate',
'sticky',
'tnid',
'translate',
))
->fields('nr', array(
'vid',
'title',
'body',
'teaser',
'log',
'timestamp',
'format',
));
$query
->addField('n', 'uid', 'node_uid');
$query
->addField('nr', 'uid', 'revision_uid');
$query
->innerJoin('node', 'n', static::JOIN);
if (isset($this->configuration['node_type'])) {
$query
->condition('type', $this->configuration['node_type']);
}
return $query;
}