You are here

public static function MobileNumberWidget::defaultSettings in Mobile Number 8

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

Defines the default settings for this plugin.

Return value

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

Overrides PluginSettingsBase::defaultSettings

1 call to MobileNumberWidget::defaultSettings()
MobileNumberWidget::formElement in src/Plugin/Field/FieldWidget/MobileNumberWidget.php
Returns the form for a single field widget.

File

src/Plugin/Field/FieldWidget/MobileNumberWidget.php, line 31

Class

MobileNumberWidget
Plugin implementation of the 'mobile_number' widget.

Namespace

Drupal\mobile_number\Plugin\Field\FieldWidget

Code

public static function defaultSettings() {

  /** @var \Drupal\mobile_number\Element\MobileNumberUtilInterface $util */
  $util = \Drupal::service('mobile_number.util');
  return parent::defaultSettings() + [
    'default_country' => 'US',
    'countries' => [],
    'placeholder' => NULL,
  ];
}