You are here

public function LanguageSelect::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/LanguageSelect.php, line 50

Class

LanguageSelect
Provides a 'language_select' element.

Namespace

Drupal\yamlform\Plugin\YamlFormElement

Code

public function getFormats() {
  return parent::getFormats() + [
    'text' => $this
      ->t('Text'),
    'langcode' => $this
      ->t('Langcode'),
    'language' => $this
      ->t('Language'),
  ];
}