You are here

public static function TextWithExpandCollapseButtonsFormatter::defaultSettings in Formatter Suite 8

Defines the default settings for this plugin.

Return value

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

Overrides PluginSettingsBase::defaultSettings

File

src/Plugin/Field/FieldFormatter/TextWithExpandCollapseButtonsFormatter.php, line 45

Class

TextWithExpandCollapseButtonsFormatter
Formats text with expand/collapse buttons to show more/less.

Namespace

Drupal\formatter_suite\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
  return [
    'collapsedHeight' => '8em',
    'expandButtonLabel' => t('Expand...'),
    'collapseButtonLabel' => t('Collapse...'),
    'animationDuration' => 500,
  ];
}