You are here

public function OptionsBase::getFormats in YAML Form 8

Get an element's available formats.

Return value

array An associative array of formats containing name/label pairs.

Overrides YamlFormElementBase::getFormats

File

src/Plugin/YamlFormElement/OptionsBase.php, line 281

Class

OptionsBase
Provides a base 'options' element.

Namespace

Drupal\yamlform\Plugin\YamlFormElement

Code

public function getFormats() {
  return parent::getFormats() + [
    'comma' => $this
      ->t('Comma'),
    'semicolon' => $this
      ->t('Semicolon'),
    'and' => $this
      ->t('And'),
    'ol' => $this
      ->t('Ordered list'),
    'ul' => $this
      ->t('Unordered list'),
  ];
}