public function WebformCodeMirror::getItemFormats in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElement/WebformCodeMirror.php \Drupal\webform\Plugin\WebformElement\WebformCodeMirror::getItemFormats()
Get an element's available single value formats.
Return value
array An associative array of single value formats containing name/label pairs.
Overrides WebformElementBase::getItemFormats
File
- src/
Plugin/ WebformElement/ WebformCodeMirror.php, line 78
Class
- WebformCodeMirror
- Provides a 'webform_codemirror' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function getItemFormats() {
return parent::getItemFormats() + [
'code' => $this
->t('Code'),
];
}