You are here

public function WebformExporterBase::getArchiveType in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformExporterBase.php \Drupal\webform\Plugin\WebformExporterBase::getArchiveType()

Get archive file type.

Return value

string Archive file type.

Overrides WebformExporterInterface::getArchiveType

2 calls to WebformExporterBase::getArchiveType()
WebformExporterBase::addToArchive in src/Plugin/WebformExporterBase.php
Add file, directory, or content to exporter archive.
WebformExporterBase::getArchiveFileExtension in src/Plugin/WebformExporterBase.php
Get archive file extension for a webform.

File

src/Plugin/WebformExporterBase.php, line 336

Class

WebformExporterBase
Provides a base class for a results exporter.

Namespace

Drupal\webform\Plugin

Code

public function getArchiveType() {
  return $this->configuration['archive_type'] === WebformExporterInterface::ARCHIVE_ZIP && class_exists('\\ZipArchive') ? WebformExporterInterface::ARCHIVE_ZIP : WebformExporterInterface::ARCHIVE_TAR;
}