protected function OptionsBase::getOptionsOtherType in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformElement/OptionsBase.php \Drupal\webform\Plugin\WebformElement\OptionsBase::getOptionsOtherType()
Get the other option base element type.
Return value
string|null The base element type (select|radios|checkboxes|buttons).
3 calls to OptionsBase::getOptionsOtherType()
- OptionsBase::getElementSelectorInputsOptions in src/
Plugin/ WebformElement/ OptionsBase.php - Get an element's (sub)inputs selectors as options.
- OptionsBase::getElementSelectorSourceValues in src/
Plugin/ WebformElement/ OptionsBase.php - Get an element's selectors source values.
- OptionsBase::isOptionsOther in src/
Plugin/ WebformElement/ OptionsBase.php - Determine if the element plugin type includes an other option text field.
File
- src/
Plugin/ WebformElement/ OptionsBase.php, line 113
Class
- OptionsBase
- Provides a base 'options' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
protected function getOptionsOtherType() {
if (isset($this->otherOptionType)) {
return $this->otherOptionType;
}
if (preg_match('/webform_(select|radios|checkboxes|buttons)_other$/', $this
->getPluginId(), $match)) {
$this->otherOptionType = $match[1];
}
else {
$this->otherOptionType = FALSE;
}
return $this->otherOptionType;
}