You are here

public static function OptionsShsChosenWidget::defaultSettings in Simple hierarchical select 2.0.x

Same name and namespace in other branches
  1. 8 modules/shs_chosen/src/Plugin/Field/FieldWidget/OptionsShsChosenWidget.php \Drupal\shs_chosen\Plugin\Field\FieldWidget\OptionsShsChosenWidget::defaultSettings()

Defines the default settings for this plugin.

Return value

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

Overrides OptionsShsWidget::defaultSettings

File

modules/shs_chosen/src/Plugin/Field/FieldWidget/OptionsShsChosenWidget.php, line 27

Class

OptionsShsChosenWidget
Plugin implementation of the 'options_shs_chosen' widget.

Namespace

Drupal\shs_chosen\Plugin\Field\FieldWidget

Code

public static function defaultSettings() {
  $settings_default = [
    'chosen_override' => FALSE,
    'chosen_settings' => [
      'disable_search' => FALSE,
      'search_contains' => FALSE,
      'placeholder_text_multiple' => t('Choose some options'),
      'placeholder_text_single' => t('Choose an option'),
      'no_results_text' => t('No results match'),
    ],
  ];
  return $settings_default + parent::defaultSettings();
}