public function Color::getItemFormats in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformElement/Color.php \Drupal\webform\Plugin\WebformElement\Color::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/ Color.php, line 101
Class
- Color
- Provides a 'color' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function getItemFormats() {
return parent::getItemFormats() + [
'swatch' => $this
->t('Color swatch'),
];
}