You are here

protected function WebformTermsOfService::defineDefaultProperties in Webform 8.5

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

Define an element's default properties.

Return value

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

Overrides Checkbox::defineDefaultProperties

File

src/Plugin/WebformElement/WebformTermsOfService.php, line 26

Class

WebformTermsOfService
Provides a 'terms_of_service' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function defineDefaultProperties() {
  $properties = [
    'title' => $this
      ->t('I agree to the {terms of service}.'),
    'terms_type' => 'modal',
    'terms_title' => '',
    'terms_content' => '',
  ] + parent::defineDefaultProperties();
  unset($properties['field_prefix'], $properties['field_suffix'], $properties['description'], $properties['description_display'], $properties['title_display']);
  return $properties;
}