You are here

protected function WebformElementBase::defineDefaultMultipleProperties in Webform 8.5

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

Define default multiple properties used by most elements.

Return value

array An associative array containing default multiple properties.

13 calls to WebformElementBase::defineDefaultMultipleProperties()
DateBase::defineDefaultProperties in src/Plugin/WebformElement/DateBase.php
Define an element's default properties.
Email::defineDefaultProperties in src/Plugin/WebformElement/Email.php
Define an element's default properties.
EntityAutocomplete::defineDefaultProperties in src/Plugin/WebformElement/EntityAutocomplete.php
Define an element's default properties.
Number::defineDefaultProperties in src/Plugin/WebformElement/Number.php
Define an element's default properties.
Telephone::defineDefaultProperties in src/Plugin/WebformElement/Telephone.php
Define an element's default properties.

... See full list

1 method overrides WebformElementBase::defineDefaultMultipleProperties()
WebformCompositeBase::defineDefaultMultipleProperties in src/Plugin/WebformElement/WebformCompositeBase.php
Define default multiple properties used by most elements.

File

src/Plugin/WebformElementBase.php, line 264

Class

WebformElementBase
Provides a base class for a webform element.

Namespace

Drupal\webform\Plugin

Code

protected function defineDefaultMultipleProperties() {
  return [
    'multiple' => FALSE,
    'multiple__header_label' => '',
    'multiple__min_items' => NULL,
    'multiple__empty_items' => 1,
    'multiple__add_more' => TRUE,
    'multiple__add_more_items' => 1,
    'multiple__add_more_button_label' => (string) $this
      ->t('Add'),
    'multiple__add_more_input' => TRUE,
    'multiple__add_more_input_label' => (string) $this
      ->t('more items'),
    'multiple__item_label' => (string) $this
      ->t('item'),
    'multiple__no_items_message' => (string) $this
      ->t('No items entered. Please add items below.'),
    'multiple__sorting' => TRUE,
    'multiple__operations' => TRUE,
    'multiple__add' => TRUE,
    'multiple__remove' => TRUE,
  ];
}