You are here

protected static function WebformEntityPrintAttachment::getExportTypeId in Webform 6.x

Same name and namespace in other branches
  1. 8.5 modules/webform_entity_print_attachment/src/Element/WebformEntityPrintAttachment.php \Drupal\webform_entity_print_attachment\Element\WebformEntityPrintAttachment::getExportTypeId()

Get export type id.

Parameters

array $element: An element.

Return value

string An export type id.

2 calls to WebformEntityPrintAttachment::getExportTypeId()
WebformEntityPrintAttachment::getExportTypeFileExtension in modules/webform_entity_print_attachment/src/Element/WebformEntityPrintAttachment.php
Get export type file extension.
WebformEntityPrintAttachment::getFileContent in modules/webform_entity_print_attachment/src/Element/WebformEntityPrintAttachment.php
Get a webform attachment's file content.

File

modules/webform_entity_print_attachment/src/Element/WebformEntityPrintAttachment.php, line 94

Class

WebformEntityPrintAttachment
Provides a 'webform_entity_print_attachment' element.

Namespace

Drupal\webform_entity_print_attachment\Element

Code

protected static function getExportTypeId(array $element) {
  if (isset($element['#export_type'])) {
    return $element['#export_type'];
  }
  else {
    list(, $export_type_id) = explode(':', $element['#type']);
    return $export_type_id;
  }
}