You are here

protected function WebformAttachmentBase::defineDefaultProperties in Webform 8.5

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

Define an element's default properties.

Return value

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

Overrides WebformElementBase::defineDefaultProperties

4 calls to WebformAttachmentBase::defineDefaultProperties()
WebformAttachmentToken::defineDefaultProperties in modules/webform_attachment/src/Plugin/WebformElement/WebformAttachmentToken.php
Define an element's default properties.
WebformAttachmentTwig::defineDefaultProperties in modules/webform_attachment/src/Plugin/WebformElement/WebformAttachmentTwig.php
Define an element's default properties.
WebformAttachmentUrl::defineDefaultProperties in modules/webform_attachment/src/Plugin/WebformElement/WebformAttachmentUrl.php
Define an element's default properties.
WebformEntityPrintAttachment::defineDefaultProperties in modules/webform_entity_print_attachment/src/Plugin/WebformElement/WebformEntityPrintAttachment.php
Define an element's default properties.
4 methods override WebformAttachmentBase::defineDefaultProperties()
WebformAttachmentToken::defineDefaultProperties in modules/webform_attachment/src/Plugin/WebformElement/WebformAttachmentToken.php
Define an element's default properties.
WebformAttachmentTwig::defineDefaultProperties in modules/webform_attachment/src/Plugin/WebformElement/WebformAttachmentTwig.php
Define an element's default properties.
WebformAttachmentUrl::defineDefaultProperties in modules/webform_attachment/src/Plugin/WebformElement/WebformAttachmentUrl.php
Define an element's default properties.
WebformEntityPrintAttachment::defineDefaultProperties in modules/webform_entity_print_attachment/src/Plugin/WebformElement/WebformEntityPrintAttachment.php
Define an element's default properties.

File

modules/webform_attachment/src/Plugin/WebformElement/WebformAttachmentBase.php, line 24

Class

WebformAttachmentBase
Provides a base class for 'webform_attachment' elements.

Namespace

Drupal\webform_attachment\Plugin\WebformElement

Code

protected function defineDefaultProperties() {
  return [
    // Element settings.
    'title' => '',
    // Form display.
    'title_display' => '',
    // Display settings.
    'display_on' => WebformElementDisplayOnInterface::DISPLAY_ON_NONE,
    // Attachment values.
    'filename' => '',
    'sanitize' => FALSE,
    'link_title' => '',
    'trim' => FALSE,
    'download' => FALSE,
    // Attributes.
    'wrapper_attributes' => [],
    'label_attributes' => [],
  ] + $this
    ->defineDefaultBaseProperties();
}