You are here

public static function LabelHelper::getLocalityLabels in Address 8

Gets all locality labels.

Return value

string[] The locality labels, keyed by type.

1 call to LabelHelper::getLocalityLabels()
LabelHelper::getLocalityLabel in src/LabelHelper.php
Gets the locality label for the given type.

File

src/LabelHelper.php, line 145

Class

LabelHelper
Provides translated labels for the library enums.

Namespace

Drupal\address

Code

public static function getLocalityLabels() {
  return [
    LocalityType::CITY => t('City', [], [
      'context' => 'Address label',
    ]),
    LocalityType::DISTRICT => t('District', [], [
      'context' => 'Address label',
    ]),
    LocalityType::POST_TOWN => t('Post town', [], [
      'context' => 'Address label',
    ]),
    LocalityType::SUBURB => t('Suburb', [], [
      'context' => 'Address label',
    ]),
  ];
}