You are here

public static function TwitterButtonWidget::getDefaultSettings in Twitter Embed 8

Get default settings for a widget.

Return value

array List of settings.

Overrides TwitterWidgetInterface::getDefaultSettings

3 calls to TwitterButtonWidget::getDefaultSettings()
TwitterBlockBase::defaultConfiguration in src/Plugin/Block/TwitterBlockBase.php
TwitterButtonBlock::defaultConfiguration in src/Plugin/Block/TwitterButtonBlock.php
TwitterButtonFormatter::defaultSettings in src/Plugin/Field/FieldFormatter/TwitterButtonFormatter.php
Defines the default settings for this plugin.

File

src/TwitterButtonWidget.php, line 34

Class

TwitterButtonWidget
Class TwitterButtonWidget.

Namespace

Drupal\twitter_embed

Code

public static function getDefaultSettings() {

  // @todo flatten from getButtonAvailableSettings()
  return [
    'username' => '',
    'display_style' => 'follow-button',
    'hide_username' => FALSE,
    'hide_followers_count' => FALSE,
    'size' => NULL,
    'theme' => 'light',
    'link_color' => '#2b7bb9',
    'border_color' => '#000000',
    'width' => 0,
    'height' => 600,
    'language' => '',
    // Settings are shared amongst formatters
    // so even if their values are not used,
    // they have to be declared.
    'type' => 'profile',
    'type_value' => '',
    'chrome' => NULL,
    'tweet_limit' => 0,
    'show_replies' => FALSE,
    'aria_polite' => 'polite',
  ];
}