public function D6Webform::query in Webform: Migrate 8
Same name and namespace in other branches
- 8.2 src/Plugin/migrate/source/d6/D6Webform.php \Drupal\webform_migrate\Plugin\migrate\source\d6\D6Webform::query()
Return value
\Drupal\Core\Database\Query\SelectInterface
Overrides SqlBase::query
File
- src/
Plugin/ migrate/ source/ d6/ D6Webform.php, line 31
Class
- D6Webform
- Drupal 6 webform source from database.
Namespace
Drupal\webform_migrate\Plugin\migrate\source\d6Code
public function query() {
$query = $this
->select('webform', 'wf');
$query
->innerJoin('node', 'n', 'wf.nid=n.nid');
$query
->innerJoin('node_revisions', 'nr', 'n.vid=nr.vid');
$query
->fields('wf', [
'nid',
'confirmation',
'teaser',
'status',
'submit_text',
'submit_limit',
'submit_interval',
'submit_notice',
'confirmation_format',
'allow_draft',
'redirect_url',
'block',
'auto_save',
'total_submit_limit',
'total_submit_interval',
])
->fields('nr', [
'title',
'body',
'format',
]);
$query
->addField('n', 'uid', 'node_uid');
return $query;
}