You are here

public static function LinkWithAttributesWidget::defaultSettings in Link Attributes widget 8

Defines the default settings for this plugin.

Return value

array A list of default settings, keyed by the setting name.

Overrides LinkWidget::defaultSettings

File

src/Plugin/Field/FieldWidget/LinkWithAttributesWidget.php, line 71

Class

LinkWithAttributesWidget
Plugin implementation of the 'link' widget.

Namespace

Drupal\link_attributes\Plugin\Field\FieldWidget

Code

public static function defaultSettings() {
  return [
    'placeholder_url' => '',
    'placeholder_title' => '',
    'enabled_attributes' => [
      'id' => FALSE,
      'name' => FALSE,
      'target' => TRUE,
      'rel' => TRUE,
      'class' => TRUE,
      'accesskey' => FALSE,
    ],
  ] + parent::defaultSettings();
}