You are here

interface WebformExporterInterface in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformExporterInterface.php \Drupal\webform\Plugin\WebformExporterInterface

Defines the interface for results exporters.

Hierarchy

Expanded class hierarchy of WebformExporterInterface

All classes that implement WebformExporterInterface

See also

\Drupal\webform\Annotation\WebformExporter

\Drupal\webform\Plugin\WebformExporterBase

\Drupal\webform\Plugin\WebformExporterManager

\Drupal\webform\Plugin\WebformExporterManagerInterface

Plugin API

1 file declares its use of WebformExporterInterface
WebformSubmissionExporter.php in src/WebformSubmissionExporter.php

File

src/Plugin/WebformExporterInterface.php, line 20

Namespace

Drupal\webform\Plugin
View source
interface WebformExporterInterface extends PluginInspectionInterface, ConfigurableInterface, PluginFormInterface, ContainerFactoryPluginInterface {

  /**
   * Tar archive.
   */
  const ARCHIVE_TAR = 'tar';

  /**
   * ZIP file.
   */
  const ARCHIVE_ZIP = 'zip';

  /**
   * Returns the results exporter label.
   *
   * @return string
   *   The results exporter label.
   */
  public function label();

  /**
   * Returns the results exporter description.
   *
   * @return string
   *   The results exporter description.
   */
  public function description();

  /**
   * Checks if the exporter is excluded via webform.settings.
   *
   * @return bool
   *   TRUE if the exporter is excluded.
   */
  public function isExcluded();

  /**
   * Determine if exporter generates an archive.
   *
   * @return bool
   *   TRUE if exporter generates an archive.
   */
  public function isArchive();

  /**
   * Determine if exporter can include uploaded files (in a zipped archive).
   *
   * @return bool
   *   TRUE if exporter can include uploaded files (in a zipped archive).
   */
  public function hasFiles();

  /**
   * Determine if exporter has options.
   *
   * @return bool
   *   TRUE if export has options.
   */
  public function hasOptions();

  /**
   * Returns the results exporter status.
   *
   * @return bool
   *   TRUE is the results exporter is available.
   */
  public function getStatus();

  /**
   * Create export.
   */
  public function createExport();

  /**
   * Open export.
   */
  public function openExport();

  /**
   * Close export.
   */
  public function closeExport();

  /**
   * Write header to export.
   */
  public function writeHeader();

  /**
   * Write submission to export.
   *
   * @param \Drupal\webform\WebformSubmissionInterface $webform_submission
   *   A webform submission.
   */
  public function writeSubmission(WebformSubmissionInterface $webform_submission);

  /**
   * Write footer to export.
   */
  public function writeFooter();

  /**
   * Get export file temp directory.
   *
   * @return string
   *   The export file temp directory.
   */
  public function getFileTempDirectory();

  /**
   * Get webform submission base file name.
   *
   * @param \Drupal\webform\WebformSubmissionInterface $webform_submission
   *   A webform submission.
   *
   * @return string
   *   Webform submission's base file name.
   */
  public function getSubmissionBaseName(WebformSubmissionInterface $webform_submission);

  /**
   * Get export file extension.
   *
   * @return string
   *   A file extension.
   */
  public function getFileExtension();

  /**
   * Get export base file name without an extension.
   *
   * @return string
   *   A base file name.
   */
  public function getBaseFileName();

  /**
   * Get export file name.
   *
   * @return string
   *   A file name.
   */
  public function getExportFileName();

  /**
   * Get export file path.
   *
   * @return string
   *   A file path.
   */
  public function getExportFilePath();

  /**
   * Get archive file name and path for a webform.
   *
   * @return string
   *   Archive file name and path for a form
   */
  public function getArchiveFilePath();

  /**
   * Get archive file name for a webform.
   *
   * @return string
   *   Archive file name.
   */
  public function getArchiveFileName();

  /**
   * Get archive file extension for a webform.
   *
   * @return string
   *   Archive file extension.
   */
  public function getArchiveFileExtension();

  /**
   * Get archive file type.
   *
   * @return string
   *   Archive file type.
   */
  public function getArchiveType();

  /**
   * Add file, directory, or content to exporter archive.
   *
   * @param string $path
   *   System path or file content.
   * @param string $name
   *   Archive path or file name (applies to file content).
   * @param array $options
   *   Tar and zip options.
   */
  public function addToArchive($path, $name, array $options = []);

  /**
   * Get the number of submissions to be exported with each batch.
   *
   * @return int
   *   Number of submissions to be exported with each batch.
   */
  public function getBatchLimit();

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
ContainerFactoryPluginInterface::create public static function Creates an instance of the plugin. 112
PluginFormInterface::buildConfigurationForm public function Form constructor. 36
PluginFormInterface::submitConfigurationForm public function Form submission handler. 32
PluginFormInterface::validateConfigurationForm public function Form validation handler. 18
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
WebformExporterInterface::addToArchive public function Add file, directory, or content to exporter archive. 1
WebformExporterInterface::ARCHIVE_TAR constant Tar archive.
WebformExporterInterface::ARCHIVE_ZIP constant ZIP file.
WebformExporterInterface::closeExport public function Close export. 1
WebformExporterInterface::createExport public function Create export. 1
WebformExporterInterface::description public function Returns the results exporter description. 1
WebformExporterInterface::getArchiveFileExtension public function Get archive file extension for a webform. 1
WebformExporterInterface::getArchiveFileName public function Get archive file name for a webform. 1
WebformExporterInterface::getArchiveFilePath public function Get archive file name and path for a webform. 1
WebformExporterInterface::getArchiveType public function Get archive file type. 1
WebformExporterInterface::getBaseFileName public function Get export base file name without an extension. 1
WebformExporterInterface::getBatchLimit public function Get the number of submissions to be exported with each batch. 1
WebformExporterInterface::getExportFileName public function Get export file name. 1
WebformExporterInterface::getExportFilePath public function Get export file path. 1
WebformExporterInterface::getFileExtension public function Get export file extension. 1
WebformExporterInterface::getFileTempDirectory public function Get export file temp directory. 1
WebformExporterInterface::getStatus public function Returns the results exporter status. 1
WebformExporterInterface::getSubmissionBaseName public function Get webform submission base file name. 1
WebformExporterInterface::hasFiles public function Determine if exporter can include uploaded files (in a zipped archive). 1
WebformExporterInterface::hasOptions public function Determine if exporter has options. 1
WebformExporterInterface::isArchive public function Determine if exporter generates an archive. 1
WebformExporterInterface::isExcluded public function Checks if the exporter is excluded via webform.settings. 1
WebformExporterInterface::label public function Returns the results exporter label. 1
WebformExporterInterface::openExport public function Open export. 1
WebformExporterInterface::writeFooter public function Write footer to export. 1
WebformExporterInterface::writeHeader public function Write header to export. 1
WebformExporterInterface::writeSubmission public function Write submission to export. 1