You are here

public function WebformSubmissionExporter::setExporter in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/WebformSubmissionExporter.php \Drupal\webform\WebformSubmissionExporter::setExporter()

Set results exporter.

Parameters

array $export_options: Associative array of exporter options.

Return value

\Drupal\webform\Plugin\WebformExporterInterface A results exporter.

Overrides WebformSubmissionExporterInterface::setExporter

1 call to WebformSubmissionExporter::setExporter()
WebformSubmissionExporter::buildExportOptionsForm in src/WebformSubmissionExporter.php
Build export options webform.

File

src/WebformSubmissionExporter.php, line 216

Class

WebformSubmissionExporter
Webform submission exporter.

Namespace

Drupal\webform

Code

public function setExporter(array $export_options = []) {
  $export_options += $this
    ->getDefaultExportOptions();
  $export_options['webform'] = $this
    ->getWebform();
  $export_options['source_entity'] = $this
    ->getSourceEntity();
  $this->exporter = $this->exporterManager
    ->createInstance($export_options['exporter'], $export_options);
  return $this->exporter;
}