You are here

public function YamlFormElementBase::getDefaultProperties in YAML Form 8

Only a few elements don't inherit these default properties.

Overrides YamlFormElementInterface::getDefaultProperties

See also

\Drupal\yamlform\Plugin\YamlFormElement\Textarea

\Drupal\yamlform\Plugin\YamlFormElement\YamlFormLikert

\Drupal\yamlform\Plugin\YamlFormElement\YamlFormCompositeBase

\Drupal\yamlform\Plugin\YamlFormElement\ContainerBase

15 calls to YamlFormElementBase::getDefaultProperties()
Checkbox::getDefaultProperties in src/Plugin/YamlFormElement/Checkbox.php
Only a few elements don't inherit these default properties.
Color::getDefaultProperties in src/Plugin/YamlFormElement/Color.php
Only a few elements don't inherit these default properties.
DateBase::getDefaultProperties in src/Plugin/YamlFormElement/DateBase.php
Only a few elements don't inherit these default properties.
Email::getDefaultProperties in src/Plugin/YamlFormElement/Email.php
Only a few elements don't inherit these default properties.
EntityAutocomplete::getDefaultProperties in src/Plugin/YamlFormElement/EntityAutocomplete.php
Only a few elements don't inherit these default properties.

... See full list

20 methods override YamlFormElementBase::getDefaultProperties()
Captcha::getDefaultProperties in src/Plugin/YamlFormElement/Captcha.php
Only a few elements don't inherit these default properties.
Checkbox::getDefaultProperties in src/Plugin/YamlFormElement/Checkbox.php
Only a few elements don't inherit these default properties.
Color::getDefaultProperties in src/Plugin/YamlFormElement/Color.php
Only a few elements don't inherit these default properties.
ContainerBase::getDefaultProperties in src/Plugin/YamlFormElement/ContainerBase.php
Only a few elements don't inherit these default properties.
DateBase::getDefaultProperties in src/Plugin/YamlFormElement/DateBase.php
Only a few elements don't inherit these default properties.

... See full list

File

src/YamlFormElementBase.php, line 147

Class

YamlFormElementBase
Provides a base class for a form element.

Namespace

Drupal\yamlform

Code

public function getDefaultProperties() {
  return [
    // Element settings.
    'title' => '',
    'description' => '',
    'default_value' => '',
    // Form display.
    'title_display' => '',
    'description_display' => '',
    'field_prefix' => '',
    'field_suffix' => '',
    // Form validation.
    'required' => FALSE,
    'required_error' => '',
    'unique' => FALSE,
    // Submission display.
    'format' => $this
      ->getDefaultFormat(),
    // Attributes.
    'wrapper_attributes' => [],
    'attributes' => [],
  ] + $this
    ->getDefaultBaseProperties();
}