You are here

protected function WebformSame::defineDefaultProperties in Webform 8.5

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

Class

WebformSame
Provides a 'webform_same' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function defineDefaultProperties() {
  $properties = [
    'source' => '',
    'destination' => '',
    'destination_state' => 'visible',
  ] + parent::defineDefaultProperties();
  unset($properties['required'], $properties['required_error']);
  return $properties;
}