protected function WebformToggles::getElementSelectorInputsOptions in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_toggles/src/Plugin/WebformElement/WebformToggles.php \Drupal\webform_toggles\Plugin\WebformElement\WebformToggles::getElementSelectorInputsOptions()
Get an element's (sub)inputs selectors as options.
Parameters
array $element: An element.
Return value
array An array of element (sub)input selectors.
Overrides OptionsBase::getElementSelectorInputsOptions
File
- modules/
webform_toggles/ src/ Plugin/ WebformElement/ WebformToggles.php, line 60
Class
- WebformToggles
- Provides a 'toggles' element.
Namespace
Drupal\webform_toggles\Plugin\WebformElementCode
protected function getElementSelectorInputsOptions(array $element) {
$selectors = $element['#options'];
foreach ($selectors as &$text) {
$text .= ' [' . $this
->t('Toggle') . ']';
}
return $selectors;
}