protected function OptionsLimitWebformHandler::getElementOptions in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_options_limit/src/Plugin/WebformHandler/OptionsLimitWebformHandler.php \Drupal\webform_options_limit\Plugin\WebformHandler\OptionsLimitWebformHandler::getElementOptions()
Get selected element's options.
Return value
array A key/value array of options.
2 calls to OptionsLimitWebformHandler::getElementOptions()
- OptionsLimitWebformHandler::buildConfigurationForm in modules/
webform_options_limit/ src/ Plugin/ WebformHandler/ OptionsLimitWebformHandler.php - Form constructor.
- OptionsLimitWebformHandler::getOptionsLimits in modules/
webform_options_limit/ src/ Plugin/ WebformHandler/ OptionsLimitWebformHandler.php - Get an associative array of options limits.
File
- modules/
webform_options_limit/ src/ Plugin/ WebformHandler/ OptionsLimitWebformHandler.php, line 1141
Class
- OptionsLimitWebformHandler
- Webform options and boolean (boolean) limit handler.
Namespace
Drupal\webform_options_limit\Plugin\WebformHandlerCode
protected function getElementOptions() {
$element = $this
->getElement();
// Set entity options.
$webform_element = $this
->getWebformElement();
if ($webform_element instanceof WebformElementEntityOptionsInterface) {
WebformEntityTrait::setOptions($element);
}
return $element ? OptGroup::flattenOptions($element['#options']) : [];
}