protected function TextBase::getInputMaskOptions in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElement/TextBase.php \Drupal\webform\Plugin\WebformElement\TextBase::getInputMaskOptions()
Get input masks as select menu options.
Return value
array An associative array of options.
1 call to TextBase::getInputMaskOptions()
- TextBase::form in src/
Plugin/ WebformElement/ TextBase.php - Gets the actual configuration webform array to be built.
File
- src/
Plugin/ WebformElement/ TextBase.php, line 454
Class
- TextBase
- Provides a base 'text' (field) class.
Namespace
Drupal\webform\Plugin\WebformElementCode
protected function getInputMaskOptions() {
$input_masks = $this
->getInputMasks();
$options = [];
foreach ($input_masks as $input_mask => $settings) {
$options[$input_mask] = $settings['title'] . (!empty($settings['example']) ? ' - ' . $settings['example'] : '');
}
return $options;
}