You are here

public function D7Webform::query in Webform: Migrate 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/migrate/source/d7/D7Webform.php \Drupal\webform_migrate\Plugin\migrate\source\d7\D7Webform::query()

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

src/Plugin/migrate/source/d7/D7Webform.php, line 33

Class

D7Webform
Drupal 7 webform source from database.

Namespace

Drupal\webform_migrate\Plugin\migrate\source\d7

Code

public function query() {
  $query = $this
    ->select('webform', 'wf');
  $query
    ->innerJoin('node', 'n', 'wf.nid=n.nid');
  $query
    ->innerJoin('node_revision', 'nr', 'n.vid=nr.vid');
  $query
    ->fields('wf', [
    'nid',
    'confirmation',
    'confirmation_format',
    'redirect_url',
    'status',
    'block',
    'allow_draft',
    'auto_save',
    'submit_notice',
    'submit_text',
    'submit_limit',
    'submit_interval',
    'total_submit_limit',
    'total_submit_interval',
    'progressbar_bar',
    'progressbar_page_number',
    'progressbar_percent',
    'progressbar_pagebreak_labels',
    'progressbar_include_confirmation',
    'progressbar_label_first',
    'progressbar_label_confirmation',
    'preview',
    'preview_next_button_label',
    'preview_prev_button_label',
    'preview_title',
    'preview_message',
    'preview_message_format',
    'preview_excluded_components',
    'next_serial',
    'confidential',
  ])
    ->fields('nr', [
    'title',
  ]);
  $query
    ->addField('n', 'uid', 'node_uid');
  return $query;
}