You are here

public function WebformSignature::buildExportRecord in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformElement/WebformSignature.php \Drupal\webform\Plugin\WebformElement\WebformSignature::buildExportRecord()

Build an element's export row.

Parameters

array $element: An element.

\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission.

array $export_options: An associative array of export options.

Return value

array An array containing the element's export row.

Overrides WebformElementBase::buildExportRecord

See also

\Drupal\webform\WebformSubmissionExporterInterface::getDefaultExportOptions

File

src/Plugin/WebformElement/WebformSignature.php, line 178

Class

WebformSignature
Provides a 'signature' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

public function buildExportRecord(array $element, WebformSubmissionInterface $webform_submission, array $export_options) {
  $element['#format'] = $export_options['signature_format'] === 'status' ? 'image' : 'raw';
  return [
    $this
      ->formatText($element, $webform_submission, $export_options),
  ];
}