protected function YamlFormToggles::getElementSelectorInputsOptions in YAML Form 8
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
- src/
Plugin/ YamlFormElement/ YamlFormToggles.php, line 44
Class
- YamlFormToggles
- Provides a 'toggles' element.
Namespace
Drupal\yamlform\Plugin\YamlFormElementCode
protected function getElementSelectorInputsOptions(array $element) {
$selectors = $element['#options'];
foreach ($selectors as &$text) {
$text .= ' [' . $this
->t('Toggle') . ']';
}
return $selectors;
}