You are here

public function WebformExporterBase::getBaseFileName in Webform 8.5

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

Get export base file name without an extension.

Return value

string A base file name.

Overrides WebformExporterInterface::getBaseFileName

2 calls to WebformExporterBase::getBaseFileName()
WebformExporterBase::getArchiveFileName in src/Plugin/WebformExporterBase.php
Get archive file name for a webform.
WebformExporterBase::getExportFileName in src/Plugin/WebformExporterBase.php
Get export file name.

File

src/Plugin/WebformExporterBase.php, line 294

Class

WebformExporterBase
Provides a base class for a results exporter.

Namespace

Drupal\webform\Plugin

Code

public function getBaseFileName() {
  $webform = $this
    ->getWebform();
  $source_entity = $this
    ->getSourceEntity();
  if ($source_entity) {
    return $webform
      ->id() . '.' . $source_entity
      ->getEntityTypeId() . '.' . $source_entity
      ->id();
  }
  else {
    return $webform
      ->id();
  }
}