protected function WebformVariant::defineDefaultProperties in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElement/WebformVariant.php \Drupal\webform\Plugin\WebformElement\WebformVariant::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/ WebformVariant.php, line 29
Class
- WebformVariant
- Provides a 'webform_variant' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
protected function defineDefaultProperties() {
$properties = [
// Element settings.
'title' => '',
'default_value' => '',
// Description/Help.
'help' => '',
'help_title' => '',
'description' => '',
'more' => '',
'more_title' => '',
// Form display.
'title_display' => '',
'description_display' => '',
'help_display' => '',
// Attributes.
'wrapper_attributes' => [],
'label_attributes' => [],
'attributes' => [],
// Submission display.
'format' => $this
->getItemDefaultFormat(),
'format_html' => '',
'format_text' => '',
// Flexbox.
'flex' => 1,
// Variant.
'variant' => '',
'prepopulate' => TRUE,
'randomize' => FALSE,
'display_on' => WebformElementDisplayOnInterface::DISPLAY_ON_NONE,
] + $this
->defineDefaultBaseProperties();
unset($properties['states'], $properties['states_clear']);
return $properties;
}