You are here

protected function Checkbox::defineDefaultProperties in Webform 8.5

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

Define an element's default properties.

Return value

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

Overrides BooleanBase::defineDefaultProperties

3 calls to Checkbox::defineDefaultProperties()
WebformSame::defineDefaultProperties in src/Plugin/WebformElement/WebformSame.php
Define an element's default properties.
WebformTermsOfService::defineDefaultProperties in src/Plugin/WebformElement/WebformTermsOfService.php
Define an element's default properties.
WebformToggle::defineDefaultProperties in modules/webform_toggles/src/Plugin/WebformElement/WebformToggle.php
Define an element's default properties.
3 methods override Checkbox::defineDefaultProperties()
WebformSame::defineDefaultProperties in src/Plugin/WebformElement/WebformSame.php
Define an element's default properties.
WebformTermsOfService::defineDefaultProperties in src/Plugin/WebformElement/WebformTermsOfService.php
Define an element's default properties.
WebformToggle::defineDefaultProperties in modules/webform_toggles/src/Plugin/WebformElement/WebformToggle.php
Define an element's default properties.

File

src/Plugin/WebformElement/Checkbox.php, line 24

Class

Checkbox
Provides a 'checkbox' element.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function defineDefaultProperties() {
  $properties = [
    'title_display' => 'after',
    // Checkbox.
    'exclude_empty' => FALSE,
  ] + parent::defineDefaultProperties();
  unset($properties['unique'], $properties['unique_entity'], $properties['unique_user'], $properties['unique_error'], $properties['format_items'], $properties['format_items_html'], $properties['format_items_text']);
  return $properties;
}