public function WebformTableTrait::getElementSelectorSourceValues in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElement/WebformTableTrait.php \Drupal\webform\Plugin\WebformElement\WebformTableTrait::getElementSelectorSourceValues()
File
- src/
Plugin/ WebformElement/ WebformTableTrait.php, line 117
Class
- WebformTableTrait
- Provides a 'table' trait.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function getElementSelectorSourceValues(array $element) {
if ($this
->hasMultipleValues($element)) {
return [];
}
$name = $element['#webform_key'];
$options = OptGroup::flattenOptions($element['#options']);
return [
":input[name=\"{$name}\"]" => $options,
];
}