You are here

public function YamlFormSubmissionExporter::setExporter in YAML Form 8

Set results exporter.

Parameters

array $export_options: Associative array of exporter options.

Return value

\Drupal\yamlform\YamlFormExporterInterface A results exporter.

Overrides YamlFormSubmissionExporterInterface::setExporter

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

File

src/YamlFormSubmissionExporter.php, line 198

Class

YamlFormSubmissionExporter
Form submission exporter.

Namespace

Drupal\yamlform

Code

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