You are here

public function YamlFormElementBase::getFormats in YAML Form 8

Get an element's available formats.

Return value

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

Overrides YamlFormElementInterface::getFormats

15 calls to YamlFormElementBase::getFormats()
Color::getFormats in src/Plugin/YamlFormElement/Color.php
Get an element's available formats.
DateBase::getFormats in src/Plugin/YamlFormElement/DateBase.php
Get an element's available formats.
Email::getFormats in src/Plugin/YamlFormElement/Email.php
Get an element's available formats.
LanguageSelect::getFormats in src/Plugin/YamlFormElement/LanguageSelect.php
Get an element's available formats.
OptionsBase::getFormats in src/Plugin/YamlFormElement/OptionsBase.php
Get an element's available formats.

... See full list

18 methods override YamlFormElementBase::getFormats()
Captcha::getFormats in src/Plugin/YamlFormElement/Captcha.php
Get an element's available formats.
Color::getFormats in src/Plugin/YamlFormElement/Color.php
Get an element's available formats.
ContainerBase::getFormats in src/Plugin/YamlFormElement/ContainerBase.php
Get an element's available formats.
DateBase::getFormats in src/Plugin/YamlFormElement/DateBase.php
Get an element's available formats.
Email::getFormats in src/Plugin/YamlFormElement/Email.php
Get an element's available formats.

... See full list

File

src/YamlFormElementBase.php, line 661

Class

YamlFormElementBase
Provides a base class for a form element.

Namespace

Drupal\yamlform

Code

public function getFormats() {
  return [
    'value' => $this
      ->t('Value'),
    'raw' => $this
      ->t('Raw value'),
  ];
}