protected function WebformMapping::defineDefaultProperties in Webform 8.5
Same name and namespace in other branches
- 6.x 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 34
Class
- WebformMapping
- Provides a 'mapping' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
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();
}