You are here

protected function WebformComputedBase::defineDefaultProperties in Webform 8.5

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

Define an element's default properties.

Return value

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

Overrides WebformElementBase::defineDefaultProperties

1 call to WebformComputedBase::defineDefaultProperties()
WebformComputedTwig::defineDefaultProperties in src/Plugin/WebformElement/WebformComputedTwig.php
Define an element's default properties.
1 method overrides WebformComputedBase::defineDefaultProperties()
WebformComputedTwig::defineDefaultProperties in src/Plugin/WebformElement/WebformComputedTwig.php
Define an element's default properties.

File

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

Class

WebformComputedBase
Provides a base class for 'webform_computed' elements.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function defineDefaultProperties() {
  return [
    // Element settings.
    'title' => '',
    // Markup settings.
    'display_on' => WebformElementDisplayOnInterface::DISPLAY_ON_BOTH,
    // Description/Help.
    'help' => '',
    'help_title' => '',
    'description' => '',
    'more' => '',
    'more_title' => '',
    // Form display.
    'title_display' => '',
    'description_display' => '',
    // Computed values.
    'template' => '',
    'mode' => WebformComputedBaseElement::MODE_AUTO,
    'hide_empty' => FALSE,
    'store' => FALSE,
    'ajax' => FALSE,
    // Attributes.
    'wrapper_attributes' => [],
    'label_attributes' => [],
  ] + $this
    ->defineDefaultBaseProperties();
}