You are here

protected function WebformMapping::defineDefaultProperties in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformElement/WebformMapping.php \Drupal\webform\Plugin\WebformElement\WebformMapping::defineDefaultProperties()

Define an element's default properties.

Return value

array An associative array contain an the element's default properties.

Overrides WebformElementBase::defineDefaultProperties

File

src/Plugin/WebformElement/WebformMapping.php, line 51

Class

WebformMapping
Provides a 'mapping' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function defineDefaultProperties() {
  return [
    'title' => '',
    'default_value' => [],
    // Description/Help.
    'help' => '',
    'help_title' => '',
    'description' => '',
    'more' => '',
    'more_title' => '',
    // Form display.
    'title_display' => '',
    'description_display' => '',
    'help_display' => '',
    'disabled' => FALSE,
    // Form validation.
    'required' => FALSE,
    'required_error' => '',
    // Submission display.
    'format' => $this
      ->getItemDefaultFormat(),
    'format_html' => '',
    'format_text' => '',
    'format_attributes' => [],
    // Mapping settings.
    'arrow' => '→',
    'source' => [],
    'source__description_display' => 'description',
    'source__title' => 'Source',
    'destination' => [],
    'destination__type' => 'select',
    'destination__title' => 'Destination',
    'destination__description' => '',
    // Attributes.
    'wrapper_attributes' => [],
    'label_attributes' => [],
  ] + $this
    ->defineDefaultBaseProperties();
}