You are here

public function WebformElementBase::getItemsFormats in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformElementBase.php \Drupal\webform\Plugin\WebformElementBase::getItemsFormats()

Get an element's available multiple value formats.

Return value

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

Overrides WebformElementInterface::getItemsFormats

2 calls to WebformElementBase::getItemsFormats()
OptionsBase::getItemsFormats in src/Plugin/WebformElement/OptionsBase.php
Get an element's available multiple value formats.
WebformElementBase::form in src/Plugin/WebformElementBase.php
Gets the actual configuration webform array to be built.
2 methods override WebformElementBase::getItemsFormats()
OptionsBase::getItemsFormats in src/Plugin/WebformElement/OptionsBase.php
Get an element's available multiple value formats.
WebformCompositeBase::getItemsFormats in src/Plugin/WebformElement/WebformCompositeBase.php
Get an element's available multiple value formats.

File

src/Plugin/WebformElementBase.php, line 1845

Class

WebformElementBase
Provides a base class for a webform element.

Namespace

Drupal\webform\Plugin

Code

public function getItemsFormats() {
  return [
    'comma' => $this
      ->t('Comma'),
    'semicolon' => $this
      ->t('Semicolon'),
    'and' => $this
      ->t('And'),
    'ol' => $this
      ->t('Ordered list'),
    'ul' => $this
      ->t('Unordered list'),
  ];
}