You are here

final public static function TwitterTimelineWidget::getDefaultSettings in Twitter Embed 8

Get default settings for a widget.

Return value

array List of settings.

Overrides TwitterWidgetInterface::getDefaultSettings

2 calls to TwitterTimelineWidget::getDefaultSettings()
TwitterTimelineBlock::defaultConfiguration in src/Plugin/Block/TwitterTimelineBlock.php
TwitterTimelineFormatter::defaultSettings in src/Plugin/Field/FieldFormatter/TwitterTimelineFormatter.php
Defines the default settings for this plugin.

File

src/TwitterTimelineWidget.php, line 37

Class

TwitterTimelineWidget
Class TwitterTimelineWidget.

Namespace

Drupal\twitter_embed

Code

public static final function getDefaultSettings() {

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