You are here

protected function ProcessedText::setConfigurationFormDefaultValue in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/WebformElement/ProcessedText.php \Drupal\webform\Plugin\WebformElement\ProcessedText::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/ProcessedText.php, line 125

Class

ProcessedText
Provides a 'processed_text' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function setConfigurationFormDefaultValue(array &$form, array &$element_properties, array &$property_element, $property_name) {

  // Apply element.format to the text (text_format) element and unset it.
  if ($property_name === 'text') {
    $property_element['#format'] = $element_properties['format'];
    unset($element_properties['format']);
  }
  parent::setConfigurationFormDefaultValue($form, $element_properties, $property_element, $property_name);
}