You are here

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

Class

YamlFormVideoFile
Provides a 'yamlform_video_file' element.

Namespace

Drupal\yamlform\Plugin\YamlFormElement

Code

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