You are here

public static function ExpandCollapseFormatter::defaultSettings in Expand collapse formatter 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/ExpandCollapseFormatter.php, line 31
Contains the ExpandCollapseFormatter class.

Class

ExpandCollapseFormatter
The expand collapse formatter.

Namespace

Drupal\expand_collapse_formatter\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
  return [
    'trim_length' => 300,
    'default_state' => 'collapsed',
    'link_text_open' => 'Show more',
    'link_text_close' => 'Show less',
    'link_class_open' => 'ecf-open',
    'link_class_close' => 'ecf-close',
  ] + parent::defaultSettings();
}