You are here

protected function DateList::setConfigurationFormDefaultValue in Webform 6.x

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

Set an element's configuration webform element default value.

Parameters

array $form: An element's configuration webform.

array $element_properties: The element's properties without hash prefix.

array $property_element: The webform input used to set an element's property.

string $property_name: THe property's name.

Overrides WebformElementBase::setConfigurationFormDefaultValue

File

src/Plugin/WebformElement/DateList.php, line 225

Class

DateList
Provides a 'datelist' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function setConfigurationFormDefaultValue(array &$form, array &$element_properties, array &$property_element, $property_name) {
  if (in_array($property_name, [
    'date_text_parts',
    'date_part_order',
  ])) {
    $element_properties[$property_name] = array_combine($element_properties[$property_name], $element_properties[$property_name]);
  }
  parent::setConfigurationFormDefaultValue($form, $element_properties, $property_element, $property_name);
}