You are here

public static function WebformTestCompositeFile::getCompositeElements in Webform 8.5

Same name and namespace in other branches
  1. 6.x tests/modules/webform_test_element/src/Element/WebformTestCompositeFile.php \Drupal\webform_test_element\Element\WebformTestCompositeFile::getCompositeElements()

Get a renderable array of webform elements.

Parameters

array $element: A render array for the current element.

Return value

array A renderable array of webform elements, containing the base properties for the composite's webform elements.

Overrides WebformCompositeBase::getCompositeElements

File

tests/modules/webform_test_element/src/Element/WebformTestCompositeFile.php, line 17

Class

WebformTestCompositeFile
Provides a webform composite element file for testing.

Namespace

Drupal\webform_test_element\Element

Code

public static function getCompositeElements(array $element) {
  $elements = [];
  $elements['textfield'] = [
    '#type' => 'textfield',
    '#title' => t('textfield'),
  ];
  $elements['managed_file'] = [
    '#type' => 'managed_file',
    '#title' => 'managed_file',
  ];
  return $elements;
}