public function WebformEntityReferenceTrait::getItemFormats in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElement/WebformEntityReferenceTrait.php \Drupal\webform\Plugin\WebformElement\WebformEntityReferenceTrait::getItemFormats()
File
- src/
Plugin/ WebformElement/ WebformEntityReferenceTrait.php, line 173
Class
- WebformEntityReferenceTrait
- Provides an 'entity_reference' trait.
Namespace
Drupal\webform\Plugin\WebformElementCode
public function getItemFormats() {
$formats = parent::getItemFormats() + [
'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'),
];
if ($this
->hasProperty('breadcrumb')) {
$formats['breadcrumb'] = $this
->t('Breadcrumb');
}
return $formats;
}