You are here

public function YamlFormEntityReferenceTrait::getFormats in YAML Form 8

File

src/Plugin/YamlFormElement/YamlFormEntityReferenceTrait.php, line 108

Class

YamlFormEntityReferenceTrait
Provides an 'entity_reference' trait.

Namespace

Drupal\yamlform\Plugin\YamlFormElement

Code

public function getFormats() {
  return parent::getFormats() + [
    'link' => $this
      ->t('Link'),
    'id' => $this
      ->t('Entity ID'),
    'label' => $this
      ->t('Label'),
    'text' => $this
      ->t('Label (ID)'),
    'teaser' => $this
      ->t('Teaser'),
    'default' => $this
      ->t('Default'),
  ];
}