You are here

public function MobileNumber::getItemFormats in Mobile Number 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/WebformElement/MobileNumber.php \Drupal\mobile_number\Plugin\WebformElement\MobileNumber::getItemFormats()

Get an element's available single value formats.

Return value

array An associative array of single value formats containing name/label pairs.

Overrides WebformElementBase::getItemFormats

File

src/Plugin/WebformElement/MobileNumber.php, line 192

Class

MobileNumber
Provides a 'mobile_number' element.

Namespace

Drupal\mobile_number\Plugin\WebformElement

Code

public function getItemFormats() {
  return parent::getItemFormats() + [
    'mobile_number_international' => $this
      ->t('International'),
    'mobile_number_local' => $this
      ->t('Local Number'),
  ];
}