public function Webform::getElementsSelectorSourceValues in Webform 8.5
Same name and namespace in other branches
- 6.x src/Entity/Webform.php \Drupal\webform\Entity\Webform::getElementsSelectorSourceValues()
Get webform element options as autocomplete source values.
Return value
array Webform element options as autocomplete source values.
Overrides WebformInterface::getElementsSelectorSourceValues
File
- src/
Entity/ Webform.php, line 1408
Class
- Webform
- Defines the webform entity.
Namespace
Drupal\webform\EntityCode
public function getElementsSelectorSourceValues() {
/** @var \Drupal\webform\Plugin\WebformElementManagerInterface $element_manager */
$element_manager = \Drupal::service('plugin.manager.webform.element');
$source_values = [];
$elements = $this
->getElementsInitializedAndFlattened();
foreach ($elements as $element) {
$element_plugin = $element_manager
->getElementInstance($element, $this);
$source_values += $element_plugin
->getElementSelectorSourceValues($element);
}
return $source_values;
}