You are here

public static function FaqFieldDefaultWidget::defaultSettings in FAQ Field 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/Field/FieldWidget/FaqFieldDefaultWidget.php \Drupal\faqfield\Plugin\Field\FieldWidget\FaqFieldDefaultWidget::defaultSettings()

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/FieldWidget/FaqFieldDefaultWidget.php, line 26

Class

FaqFieldDefaultWidget
Plugin implementation of the 'faqfield_default' widget.

Namespace

Drupal\faqfield\Plugin\Field\FieldWidget

Code

public static function defaultSettings() {
  return [
    'answer_widget' => 'text_format',
    'question_title' => t('Question'),
    'answer_title' => t('Answer'),
    'question_field_required' => FALSE,
    'answer_field_required' => FALSE,
    'advanced' => [
      'question_length' => 255,
      'question_size' => 100,
      'question_rows' => 0,
      'answer_rows' => 3,
    ],
  ] + parent::defaultSettings();
}