You are here

interface FormatterInterface in Telephone Formatter 8

Formatter service interface.

@package Drupal\telephone_formatter

Hierarchy

Expanded class hierarchy of FormatterInterface

All classes that implement FormatterInterface

1 file declares its use of FormatterInterface
TelephoneFormatter.php in src/Plugin/Field/FieldFormatter/TelephoneFormatter.php

File

src/FormatterInterface.php, line 10

Namespace

Drupal\telephone_formatter
View source
interface FormatterInterface {

  /**
   * Formats telephone number into massaged one based on predefined format.
   *
   * @param string $input
   *   Input phone number.
   * @param string $format
   *   Format option.
   * @param null|string $region
   *   Country code.
   *
   * @return string
   *   Formatted string.
   */
  public function format($input, $format, $region = NULL);

}

Members

Namesort descending Modifiers Type Description Overrides
FormatterInterface::format public function Formats telephone number into massaged one based on predefined format. 1