You are here

public function WebformAttachmentBase::getExportAttachments in Webform 6.x

Get files as export attachments.

This is also used to export attachments.

Parameters

array $element: An element.

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

array $options: An array of options.

Return value

array An array containing email attachments which include an attachments 'filename', 'filemime', 'filepath', and 'filecontent'.

Overrides WebformElementAttachmentInterface::getExportAttachments

See also

\Drupal\webform\WebformSubmissionExporter::writeRecords

File

modules/webform_attachment/src/Plugin/WebformElement/WebformAttachmentBase.php, line 283

Class

WebformAttachmentBase
Provides a base class for 'webform_attachment' elements.

Namespace

Drupal\webform_attachment\Plugin\WebformElement

Code

public function getExportAttachments(array $element, WebformSubmissionInterface $webform_submission, array $options = []) {
  return $this
    ->getEmailAttachments($element, $webform_submission, $options);
}