You are here

public function WebformAttachmentBase::getItemFormats in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_attachment/src/Plugin/WebformElement/WebformAttachmentBase.php \Drupal\webform_attachment\Plugin\WebformElement\WebformAttachmentBase::getItemFormats()

Get an element's available single value formats.

Return value

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

Overrides WebformElementBase::getItemFormats

File

modules/webform_attachment/src/Plugin/WebformElement/WebformAttachmentBase.php, line 115

Class

WebformAttachmentBase
Provides a base class for 'webform_attachment' elements.

Namespace

Drupal\webform_attachment\Plugin\WebformElement

Code

public function getItemFormats() {
  return [
    'link' => $this
      ->t('File link'),
    'name' => $this
      ->t('File name'),
    'url' => $this
      ->t('File URL'),
  ];
}