WebformTestCompositeFile.php in Webform 6.x
File
tests/modules/webform_test_element/src/Element/WebformTestCompositeFile.php
View source
<?php
namespace Drupal\webform_test_element\Element;
use Drupal\webform\Element\WebformCompositeBase;
class WebformTestCompositeFile extends WebformCompositeBase {
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;
}
public function preview() {
return [];
}
}