You are here

public static function TelephoneFormatter::availableFormats in Telephone Formatter 8

List of available formats.

2 calls to TelephoneFormatter::availableFormats()
TelephoneFormatter::settingsForm in src/Plugin/Field/FieldFormatter/TelephoneFormatter.php
Returns a form to configure settings for the formatter.
TelephoneFormatter::settingsSummary in src/Plugin/Field/FieldFormatter/TelephoneFormatter.php
Returns a short summary for the current formatter settings.

File

src/Plugin/Field/FieldFormatter/TelephoneFormatter.php, line 259

Class

TelephoneFormatter
Plugin implementation of the 'telephone_formatter' formatter.

Namespace

Drupal\telephone_formatter\Plugin\Field\FieldFormatter

Code

public static function availableFormats() {
  return [
    PhoneNumberFormat::INTERNATIONAL => t('International'),
    PhoneNumberFormat::E164 => t('E164'),
    PhoneNumberFormat::NATIONAL => t('National'),
    PhoneNumberFormat::RFC3966 => t('RFC3966'),
  ];
}