You are here

public function YamlFormAudioFile::getFormats in YAML Form 8

Get an element's available formats.

Return value

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

Overrides YamlFormManagedFileBase::getFormats

File

src/Plugin/YamlFormElement/YamlFormAudioFile.php, line 20

Class

YamlFormAudioFile
Provides a 'yamlform_audio_file' element.

Namespace

Drupal\yamlform\Plugin\YamlFormElement

Code

public function getFormats() {
  $formats = parent::getFormats();
  $formats['file'] = $this
    ->t('HTML5 Audio player (MP3 only)');
  return $formats;
}