You are here

public static function MachineNameWidget::defaultSettings in Machine Name Widget 8

Defines the default settings for this plugin.

Return value

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

Overrides StringTextfieldWidget::defaultSettings

File

src/Plugin/Field/FieldWidget/MachineNameWidget.php, line 29
Contains \Drupal\machine_name_widget\Plugin\Field\FieldWidget\MachineNameWidget.

Class

MachineNameWidget
Plugin implementation of the 'machine_name' widget.

Namespace

Drupal\machine_name_widget\Plugin\Field\FieldWidget

Code

public static function defaultSettings() {
  $settings = parent::defaultSettings();
  foreach (self::getSettingsKeys() as $key) {
    $settings[$key] = '';
  }
  return $settings;
}