public static function MobileNumberItem::defaultFieldSettings in Mobile Number 8
Same name and namespace in other branches
- 2.0.x src/Plugin/Field/FieldType/MobileNumberItem.php \Drupal\mobile_number\Plugin\Field\FieldType\MobileNumberItem::defaultFieldSettings()
Defines the field-level settings for this plugin.
Return value
array A list of default settings, keyed by the setting name.
Overrides FieldItemBase::defaultFieldSettings
1 call to MobileNumberItem::defaultFieldSettings()
- MobileNumberItem::fieldSettingsForm in src/
Plugin/ Field/ FieldType/ MobileNumberItem.php - Returns a form for the field-level settings.
File
- src/
Plugin/ Field/ FieldType/ MobileNumberItem.php, line 42
Class
- MobileNumberItem
- Plugin implementation of the 'mobile_number' field type.
Namespace
Drupal\mobile_number\Plugin\Field\FieldTypeCode
public static function defaultFieldSettings() {
/** @var \Drupal\mobile_number\MobileNumberUtilInterface $util */
$util = \Drupal::service('mobile_number.util');
return parent::defaultFieldSettings() + [
'verify' => $util
->isSmsEnabled() ? $util::MOBILE_NUMBER_VERIFY_OPTIONAL : MobileNumberUtilInterface::MOBILE_NUMBER_VERIFY_NONE,
'message' => $util::MOBILE_NUMBER_DEFAULT_SMS_MESSAGE,
'countries' => [],
];
}