You are here

public function WebformEntityPrintAttachment::finalize in Webform 6.x

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

Finalize an element to be rendered within a webform.

Parameters

array $element: An element.

\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission. Webform submission is optional since it is not used by composite sub elements.

Overrides WebformElementBase::finalize

See also

\Drupal\webform\Element\WebformCompositeBase::processWebformComposite

File

modules/webform_entity_print_attachment/src/Plugin/WebformElement/WebformEntityPrintAttachment.php, line 58

Class

WebformEntityPrintAttachment
Provides a 'webform_entity_print_attachment' element.

Namespace

Drupal\webform_entity_print_attachment\Plugin\WebformElement

Code

public function finalize(array &$element, WebformSubmissionInterface $webform_submission = NULL) {
  parent::finalize($element, $webform_submission);

  // Explode element_type:export_type.
  // @see \Drupal\webform_entity_print_attachment\Element\WebformEntityPrintAttachment::getExportTypeId
  list($element['#type'], $element['#export_type']) = explode(':', $element['#type']);
}